February 19, 200917 yr 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?
February 19, 200917 yr This might help: http://www.devx.com/vb2themax/Tip/18893 Or possibly this: http://4guysfromrolla.com/ASPScripts/Print...F100598-1.shtml
Create an account or sign in to comment