Get ID of last inserted record in Access

/ Published in: SQL
Save to your folder(s)

Get the value of the autonumber field for the last record inserted into an Access database via the current connection.

Copy this code and paste it in your HTML
  1. SET rst = objConn.Execute("SELECT @@IDENTITY")
  2. id = rst(0)

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.