Ok, I checked out the old threads on this topic and couldn't find something exactly like this. I have the following stored proc in SQL 7:
/*
** This procedure inserts a visit record
** and returns the identity key of the new record
*/
create procedure spLogVisit @Visitor_Name varchar(50),
@Visitor_Date datetime,
@NewRecIdent int output
AS
INSERT INTO VRS_Visit (Visitor_Name, Visit_Date) VALUES ( @Visitor_Name , @Visitor_Date )
set @NewRecIdent = @@IDENTITY
GO
All I want to do is pass in the date and username and get back the identity from and ASP page. I have gone to ASPtoday.com and noticed there are like 10 ways of doing this and have wrestled with it for hours. Can someone point me in the right direction please!!! Help! I just want to do this in my ASP:
IdentityVariable = (number returned from SP)
/*
** This procedure inserts a visit record
** and returns the identity key of the new record
*/
create procedure spLogVisit @Visitor_Name varchar(50),
@Visitor_Date datetime,
@NewRecIdent int output
AS
INSERT INTO VRS_Visit (Visitor_Name, Visit_Date) VALUES ( @Visitor_Name , @Visitor_Date )
set @NewRecIdent = @@IDENTITY
GO
All I want to do is pass in the date and username and get back the identity from and ASP page. I have gone to ASPtoday.com and noticed there are like 10 ways of doing this and have wrestled with it for hours. Can someone point me in the right direction please!!! Help! I just want to do this in my ASP:
IdentityVariable = (number returned from SP)