I want to use scope_identity using asp and MSSQL to grab the row id of the last inserted row, I have this code but it is outputting nothing
SQLn = "insert into t_table1 (item1, item2, item3) values ('" & rs("item1") & "', '" & rs("item2") & "', '" & rs("item3") & "')"
objConn.execute SQLn
Set rsIdentity = objConn.Execute("SELECT SCOPE_IDENTITY()")
response.write rsIdentity(0)
Am I missing something?