|
-
May 5th, 2005, 03:42 AM
#1
Frenzied Member
Re: Return value of Stored Procedure
If you have a return statement at the top of your procedure, then it will do just that: Return.
Nothing after the 'Return' will get executed. So, in your latest example there is no recordset created, so none will be returned.
In order to get at your return value, you'll need to use the example that techgnome posted.
I'm still not sure why you want a recordset and a return parameter containing the same value...
-
May 5th, 2005, 03:52 AM
#2
Thread Starter
Hyperactive Member
Re: Return value of Stored Procedure
I'm still not sure why you want a recordset and a return parameter containing the same value...
I just want to be able to retreive a value which is return from stored procedure and using ADO to retreive it. (Return value is after execute Other_StoredProc line in Stored Proc)
Originally Posted by techgnome
cmd.Parameters.Append cmd.CreateParameter("@ReturnValue",adInteger,adParamReturnValue)
I try your code but i got another error "Formal parameter @Result was defined as OUTPUT but the actual parameter not declared OUTPUT."
Can you tell me how should i declare a variable in my stored procedure
to able to return a value by using ADO
Thanks everyone
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
|