Hi
I have table with an incremented id as primary key
I need to retrive the scope_identity before i do the insert
Dim sSql As String = "SELECT scope_identity()"
Dim cmd As SqlCommand = m_con.CreateCommand
cmd.CommandText = sSql
Return CInt((cmd.ExecuteScalar())
)
This though returns a system.db.null
How do i get the id ?
thanks
Start Free Trial