Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the Id of something i currently inserted into access db

Tags:

c#

sql

ms-access

i found many answers to this question for other databases, but didn't found any answer for Microsoft access.

I have a table that has the following columns : ID A B C the id is auto number , how do i get the ID of a row i just inserted.

btw : i'm using C#

thanks

like image 700
OopsUser Avatar asked Nov 20 '25 17:11

OopsUser


1 Answers

See the MSDN article here. In MS Access, you'll want to SELECT @@IDENTITY within the scope of the statement which inserted the record.

like image 186
David Avatar answered Nov 23 '25 07:11

David



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!