Retrieve the last entered record

  • Thread starter Thread starter Kishan Hathiwala
  • Start date Start date
K

Kishan Hathiwala

i have added a record now in the next statement i want the id of the record
(id is autonumber field in the access mdb) how can i get it using vb.net
using oledb?

Kishan
 
U¿ytkownik "Kishan Hathiwala said:
i have added a record now in the next statement i want the id of the record
(id is autonumber field in the access mdb) how can i get it using vb.net
using oledb?

Make additional command:
"Select @@Identity From YourTable"

Regards,
Grzegorz
 
Just as a note, the table name is not mandatory as the @@Identity is per
connection and not per table in jet/access
 
Użytkownik "Tor Martin Halvorsen"
Just as a note, the table name is not mandatory as the @@Identity is per
connection and not per table in jet/access

You have right.
Regards,
Grzegorz
 
Back
Top