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

O

Ola Fjelddahl

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
 
O

Ola Fjelddahl

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top