VistaDB 6
VistaDB.DDA Namespace / IVistaDBDatabase Interface / GetLastIdentity Method
Table name
Name of column containing identity


In This Topic
    GetLastIdentity Method
    In This Topic
    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
    )

    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