VistaDB 5






Table name
Name of column containing identity
GetLastIdentity Method
Get last value assigned to the identity column in table insert operation at this database instance. The table inserted the row may be already closed at current moment.
Syntax
'Declaration
 
Function GetLastIdentity( _
   ByVal tableName As System.String, _
   ByVal columnName As System.String _
) As IVistaDBColumn
'Usage
 
Dim instance As IVistaDBDatabase
Dim tableName As System.String
Dim columnName As System.String
Dim value As IVistaDBColumn
 
value = instance.GetLastIdentity(tableName, columnName)
IVistaDBColumn GetLastIdentity( 
   System.string tableName,
   System.string columnName
)
function GetLastIdentity( 
    tableName: System.String;
    columnName: System.String
): IVistaDBColumn; 
function GetLastIdentity( 
   tableName : System.String,
   columnName : System.String
) : IVistaDBColumn;
IVistaDBColumn* GetLastIdentity( 
   System.string* tableName,
   System.string* columnName
) 
IVistaDBColumn^ GetLastIdentity( 
   System.String^ tableName,
   System.String^ columnName
) 

Parameters

tableName
Table name
columnName
Name of column containing identity

Return Value

IVistaDBColumn instance containing last identity value. If identity is not set for the column null returned
Remarks
You may input null instead column name to get first identity column in the row. You may input null instead table name to get identity from table with last insertion
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also