Get the Identity Column after INSERT (equivalent to Select@@Identoty of MS-SQL)

Namespace:  Tornado
Assembly:  Tornado (in Tornado.dll) Version: 12.6.0.9 (1.0.0.0)

Syntax

C#
public string Get_IDENTITY()
Visual Basic (Declaration)
Public Function Get_IDENTITY As String

Return Value

Identity Column value in string.

Examples

CopyVB.NET
Dim x As New ASPDBNET.z
With x
   .dbQP = "Unit=1|S=7|M=G!sys=t|Ps=-1|Ni=b5,add|Th=ti=DB2 Boolean Field| bm=TESTSTAMP;0"
   .dbEditAddFlds = "1,fi=BOOL|ty=SelectBox|va=TnF|te=BOOL, fi=STAMP|type=hidden|def=now(yyyy-MM-dd HH:mm:ss)"
   .dbCommonTables = "(;,~)Index=TnF,BOOL|Value=-1,0~Ya,Na"
   .dbDSN = "localhost;Test1;frank;pass"
   .dbSQL = "SELECT * FROM TESTSTAMP"
   .dbBoolFlds = "BOOL"
   .dbLongDate = True
   .dbDebug = "EditAction"
   .DB2NET()
   Response.Write("Identity Column for Insert = " & Get_IDENTITY())
End With

See Also