|
-
May 4th, 2005, 09:39 PM
#1
Re: Retrieve Unique ID for a new Record
If it's not a parameter for the SP, why are you using it?
-
May 5th, 2005, 03:13 AM
#2
Thread Starter
Frenzied Member
Re: Retrieve Unique ID for a new Record
It is or at least should be a parameter for the SP. I tried it again with the @ and still get the similar error
Procedure 'sp_InsertRequestID' expects parameter '@PK_RequestID', which was not supplied
It should be the return value therefore an outpout parameter.. I think
Last edited by FishGuy; May 5th, 2005 at 04:14 AM.
Reason: more detail
-
May 5th, 2005, 08:20 AM
#3
Addicted Member
Re: Retrieve Unique ID for a new Record
I retrieved the @@Identity a little differently when I needed the new uniqueID.
Instead of trying to retrieve it back as a parameter I simply wrote:
SELECT @@Identity
Just make sure that where you execute the the command you are receiving the ID:
intID = comSQLProc.ExecuteScalar
You could try that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|