VB6 and C# are totally different.
have you tried this
SqlConnection con = new SqlConnection(); con.ConnectionString = connectionString SqlCommand com = new SqlCommand(); com.Connection = con; com.CommandType = CommandType.StoredProcedure; com.CommandText = "proc_CustomersLoadByPrimaryKey";
SqlParameter retParam = new SqlParameter(); retParam.Direction = ParameterDirection.ReturnValue; retParam.SqlDbType = SqlDbType.Int;
retParam.Value = 0;
Param.Direction = ParameterDirection.Input; Param.Value = "a";
com.Parameters.Add(retParam); com.Parameters.Add(Param); con.Open();
com.ExecuteNonQuery();
MessageBox.Show(returnValue.ToString());
con.Close();
what happens now
|