SQLiteDatabase.LastRowID

From Xojo Documentation

Method

SQLiteDatabase.LastRowID() As Int64

New in 5.5

Supported for all project types and targets.

Returns an Int64 containing the value of the last RowID added to any table in the database.

Example

This example gets the last rowid of a row added to the team table in an previously connected database:

db.SQLExecute("INSERT INTO team (Name, Coach) VALUES ('Penguins', 'Coach Mike')")
If Not db.Error Then
Dim rowID As Int64
rowID = db.LastRowID
End If