Command Object Output Parameter Undefined?



I'm trying to maintain some old ADO code and I'm having trouble
understanding how my command object is behaving. The command object is
calling a stored procedure. I set up a normal command and connection
object, then I create 2 input and one output parameter. The output
parameter is named "ReturnValue".

The thing I'm confused about is that if I call

Cmd.Execute()
Response.Write (Cmd.Parameters("ReturnValue"))

I get the proper ReturnValue, however if I call

rs1 = Cmd.Execute()
Response.Write (Cmd.Parameters("ReturnValue"))

then ReturnValue is undefined. Nothing else in the code changes. Why
would capturing the returned recordset (whether I use it or not) affect
the parameters in the Cmd object?

Puzzled,


Gary H.

.



Relevant Pages

  • Re: Command Object Output Parameter Undefined?
    ... understanding how my command object is behaving. ... connection object, then I create 2 input and one output parameter. ... Why would capturing the returned recordset ...
    (microsoft.public.data.ado)
  • Re: return data from stored procedure
    ... Dim rst As ADODB.Recordset ... (no e-mails, please!) ... using a command object? ...
    (microsoft.public.access.modulesdaovba)
  • Re: Getting values into VB from an Output parameter of a stored procedure
    ... Well I'm not sure if I can use command object. ... expects the creation of parameters in the order they are defined in the sp. ... following format to create & append parameteres how do I say to use default? ... You mark your output parameter with the ...
    (microsoft.public.vb.general.discussion)
  • Re: ASP/ADO: Return a value from a Stored Procedure
    ... I think you original way cannot get a return value from the store ... You have to use Command object and OutPut parameter, ... recordset. ... performance when we use command object. ...
    (microsoft.public.inetserver.asp.db)