Retrieve the last entered record

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
 
G

Grzegorz Danowski

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
 
G

Guest

Just as a note, the table name is not mandatory as the @@Identity is per
connection and not per table in jet/access
 
G

Grzegorz Danowski

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top