Hi,
is there any way to get the row ID for the recently saved record. Below is some details,
I am saving records in a table "Items" which is having ID column as a primary column and it's type is set to autonumber.
I need to get the value of this column (ID) for the record that was recently saved.
I am using dataset for saving records. Below is code snapshot that I am using for saving records,
is there any way to get the row ID for the recently saved record. Below is some details,
I am saving records in a table "Items" which is having ID column as a primary column and it's type is set to autonumber.
I need to get the value of this column (ID) for the record that was recently saved.
I am using dataset for saving records. Below is code snapshot that I am using for saving records,
VB.NET:
dim sql as string="Select * from Items"
dim da as oledb.oledbdataadapter=new oledb.oledbdataadapter(sql,conn)
dim cb as oledb.oledbcommandbuilder = new oledb.oledbcommandbuilder (da)
if ds.haschanged then
da.update(ds,"Items")
ds.acceptchanges
da.dispose
conn.close
conn.dispose