...

View Full Version : Getting current SQL sequence value in VBScript



flak
02-09-2007, 09:58 PM
Hi,
I am trying to put the current value from an SQL sequence onto the end of a querystring.

*****
Example:

SQL = "INSERT INTO testing VALUES (test_seq.nextval,'testing',2)
RS1 = Execute SQL

response.redirect("/testpage.asp?testid=_____")
*****
test_seq is the name of the sequence and I want that number to be then put where the ______ is.

Is this possible? :confused:

degsy
02-13-2007, 03:40 PM
Do you want the ID generated by the INSERT?

If so then in Access and SQL Server you can use @@IDENTITY
http://www.kamath.com/tutorials/tut007_identity.asp



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum