How do we get last inserted record in msaccess query
问题 I am inserting data from my vb.net application to msaccess db. I am confused in way of getting the last inserted record added to a table. IN MS-SQL we get @@IDENTITY for that but it didn't worked for me in MSAccess. so what should be do for getting the last inserted record added to a table? 回答1: Example: Dim db As Database Set db = CurrentDb db.Execute "INSERT INTO Table1 (atext) Values('abc')", dbFailOnError Dim rs As dao.Recordset Set rs = db.OpenRecordset("select @@identity") Debug.Print