Re: Reading output parameter from stored procedure...... by Anatoly
Anatoly
Wed Sep 17 02:53:50 CDT 2003
It's easy one:
SqlCommand cmd = new SqlCommand("sp_...", myConnection);
cmd.Parameters.Add("@myInputParam", SqlDbType.Char, 20).Value =
"myStringValue";
cmd.Parameters.Add("@myOutputParam", SqlDbType.Int).Direction =
ParametersDirection.Output;
myConnection.Open()
cmd.ExecuteNonQuery()
//here it come:
int ReturnValue = cmd.Parameters["@myOutputParam"].Value;
myConnection.Close();
HTH
"Gish Smith" <Gish123@yahoo.com> wrote in message
news:uldlBBNfDHA.2248@TK2MSFTNGP09.phx.gbl...
> In my ADO.Net coding I am using SQLCommand and SQLParameter to run stored
> procedure. Can any one advice me how to read the output parameter from a
> stored procedure. I am using SQL Server 2000.
> Gish Smith
>
>