MS SQL last inserted id
|
|
To retrive last inserted id we can use scope_identity function on MS SQL. Here is sample VB# code Dim cmd As New SqlCommand Dim varLASTID as integer cmd.CommandText = "SELECT scope_identity()" varLASTID = CStr(cmd.ExecuteScalar()) Have a nice work , Turkay DARCAN
|
|