dim cnn as oledbconnection
dim cmd as oledbcommand
strsql="insert into tables("datafield")values(...)"
cnn.open()
cmd=new oledbcommand(strsql,cnn)
cmd.executenonquery
strsql="Select max(ID) from table"
cmd=new oledbcommand(strsql,cnn)
cmd.executenonquery
cnn.close