Unanswered: Insert with SP / retrieve ID to session
I made an insert using a Stored Procedure (MS SQL 2000), how can I store the
ID of the last inserted record into a session var ? I have code to do this
with a regular "Insert" page, but didnt work for the SP.
This is the code I have for the insert:
<!--set up Auto Number retrieval for SQL Server -->
var rsNewAutoIncrement = MM_editCmd.ActiveConnection.Execute("select
Session("svReq_ID") = rsNewAutoIncrement(0).Value
<!--var rsNewAutoIncrement = Nothing -->
<!--end retrieval -->
I need to add code here to retreive the ID just insterted, but the above
code didnt work ... I am looking in the web in the meantime, but if someone knows where I could find it that would save a lot of time ...