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

  • Thread starter Thread starter Ola Fjelddahl
  • Start date Start date
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
 
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
 
Back
Top