example below can we get a parameter by name or have to use the indexOf
SqlCommand cmd = new SqlCommand("proc_ERRORLOG_INSERT", oConn);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter param = new SqlParameter();
cmd.Parameters.Add("@Fileid", SqlDbType.Int).Value=99999;
cmd.Parameters.Add("@ErrorMessage", SqlDbType.VarChar).Value="Service Failed
on APP Server1";
cmd.Parameters.Add("@Retvalue",
SqlDbType.Int).Direction=ParameterDirection.Output ;
int iret = cmd.ExecuteNonQuery();
Console.WriteLine("return value "+iret.ToString()); //iRet is Rows
Affected
Console.WriteLine(cmd.Parameters.IndexOf("@Retvalu e")); // Proc Return
Number (value)
console.Read();
how can i get the @retvalue by name , Not by its index position in the
collection
TIA MJ