hi.

I cannot retrieve an output parameter from a stored procedure by name. Is
this correct?

Works not:
[ sParamValue = mycmd.Parameters["@ID"].Value.ToString(); ]

Works fine:
[ sParamValue = mycmd.Parameters[0].Value.ToString(); ]

TIA

/OF

Re: read an output parameter from a stored procedure by its name? by Miha

Miha
Thu Dec 04 14:46:03 CST 2003

Hi,

How's your command defined?

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com

"Ola Fjelddahl" <ola(dot)fjelddahl(at)diespammers.mandator.com> wrote in
message news:e2CCESquDHA.2248@TK2MSFTNGP09.phx.gbl...
> hi.
>
> I cannot retrieve an output parameter from a stored procedure by name. Is
> this correct?
>
> Works not:
> [ sParamValue = mycmd.Parameters["@ID"].Value.ToString(); ]
>
> Works fine:
> [ sParamValue = mycmd.Parameters[0].Value.ToString(); ]
>
> TIA
>
> /OF
>
>



Re: read an output parameter from a stored procedure by its name? by Ola

Ola
Thu Dec 04 14:57:46 CST 2003

hi.

Sorry. Forget my question. There was a stray space in a variable that
fooled me for two days. The code below works alright.

> I cannot retrieve an output parameter from a stored procedure by name. Is
> this correct?
> Works not:
> [ sParamValue = mycmd.Parameters["@ID"].Value.ToString(); ]
> Works fine:
> [ sParamValue = mycmd.Parameters[0].Value.ToString(); ]

/OF