Switch to: V9V8V7V6V5

LastRecID Functions

Last_RecID( dbName )

Returns the last RecID inserted in the database. If dbName is specified then returns the last RecID for the specified database. Otherwise for the current database.

SELECT Last_RecID();
=> 0
SELECT Last_RecID( 'db1' );
=> 1

Last_RecID_Of_Table( tblName )

There are two forms:

Last_RecID_Of_Table( tblName ) Last_RecID_Of_Table( dbName, tblName )

Returns the last RecID inserted in the particular table. If dbName is specified then table is seeking in that database, otherwise in the current database.

SELECT Last_RecID_Of_Table( 't1' );
=> 0
SELECT Last_RecID_Of_Table( 'db1', 't1' );
=> 1