returning an @@identity from stored procedure

Results 1 to 2 of 2

Thread: returning an @@identity from stored procedure

  1. #1
    Kate Guest

    Default returning an @@identity from stored procedure

    Hi,<BR>I know this is probably straight forward but I have never attempted it before. Basically I need to return the @@identity after a stored procedure is called. Heres some code ...Insert <BR>I call a stored procedure that goes and does an insert and gets the @@identity :-<BR>Into Task (TeamId)Values (@TeamId)<BR>select @@identity from task <BR><BR>I call the sp using the following asp...<BR>set adoCmd = Server.CreateObject("ADODB.Command")<BR>adoCmd.Act iveConnection = DBConn<BR>adoCmd.CommandType = adCmdStoredProc <BR>adoCmd.CommandText = "spInsertTaskMain"<BR>adoCmd.Execute<BR><BR>No w I need to get that @@identity !<BR><BR>Any ideas ?<BR>

  2. #2
    Join Date
    Dec 1969

    Default Here... Tips & Tricks section

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts