Returns the last inserted autoincremented field value in the current connection.
Syntax
DB_LastId()
Arguments
No arguments.
Return value
Returns the last inserted autoincremented field value in the current connection.
Dim data
Set data = CreateDictionary()
data("make") = "Toyota"
data("type") = "RAV4"
data("price") = 16000
DB_Insert "Cars",data
' get the ID of the inserted record and print it on the page
response.write DB_LastId();
See also:
•Database API: SetConnection()