Get the last inserted id in a given table - this may not work on all Database providers

Namespace: Contracts.Databases
Assembly: Contracts (in Contracts.dll)

Function GetLastInsertedID( _ 
ByVal table_name As String
) As Long
This language is not supported or no code example is available.
long GetLastInsertedID( 
string table_name 
)
This language is not supported or no code example is available.
 
long GetLastInsertedID( 
String^ table_name 
)
This language is not supported or no code example is available.
function GetLastInsertedID( 
table_name : String 
) : long;
This language is not supported or no code example is available.

Parameters

table_name
Type: string

the table name

Return Value

Type: long

the last inserted id

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1