Dynamicweb 8 Documentation
GetAddedIdentityKey(IDbConnection,IDbTransaction) Method

The connection used for the update
The transaction used for the update
The function returns the identity of the last added row to the database
Syntax
'Declaration
 
Public Overloads Shared Function GetAddedIdentityKey( _ 
   ByRef connection As IDbConnection, _ 
   ByVal transaction As IDbTransaction _ 
) As Integer
public static int GetAddedIdentityKey( 
   ref IDbConnection connection,
   IDbTransaction transaction 
)

Parameters

connection
The connection used for the update
transaction
The transaction used for the update

Return Value

The identity of the last added row
Remarks
Returns an integer - this method will only work on tables with a primary key of type identity (SQL-Server), or Auto (MS-Access)
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

Reference

Database Class
Database Members
Overload List

Send Feedback