Re: How can I get my parameters collection after a SP call?

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 06/27/04


Date: Sun, 27 Jun 2004 09:10:54 -0400


Zenobia wrote:
> Apart from the obvious (the style of the function is all wrong,
> etc.) can someone tell me what's wrong here. I can't get the
> values of the return and output parameter from my stored
> procedrue. After:
>
> Set localrs = cmd.Execute
>
> I expect the values of all 3 parameters to be available

The return and output parameter values are not available until all
recordsets produced by the procedure are "consumed", i.e., the last record
is accessed, or the recordset is closed.

That is why it is important to use "SET NOCOUNT ON" in your procedure to
prevent the creation of extra resultsets containing the informational "x
records affected ... " messages.

HTH,
Bob Barrows

-- 
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


Relevant Pages

  • Re: How can I get my parameters collection after a SP call?
    ... > Set localrs = cmd.Execute ... The return and output parameter values are not available until all ... recordsets produced by the procedure are "consumed", i.e., the last record ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: How to determine if an ADO Recordset column is required
    ... > required column. ... > pre-validation to compare the incoming data with the schema ... don't use recordsets for data maintenance in ASP. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: asp recordset
    ... > the 3 recordsets. ... I've been away on holidays in Scotland for the ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: Faster way to get record sets
    ... your database, etc. ... I still have to question why you are opening all these recordsets. ... retrieve every single field in every one of those tables. ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)