Results 1 to 28 of 28

Thread: [Resolved] Return value of Stored Procedure

Hybrid View

  1. #1
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313

    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...

  2. #2

    Thread Starter
    Hyperactive Member naruponk's Avatar
    Join Date
    Feb 2004
    Location
    Some where in the world
    Posts
    423

    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
  •  



Click Here to Expand Forum to Full Width