引用存储过程中的输出参数出错,请帮忙看看,谢谢
引用存储过程中的输出参数出错,请帮忙看看,谢谢
C#中的代码
SqlCommand aCommand = new SqlCommand( "LEM_USER_AUTHENTICATION ", conn);
aCommand.CommandType = CommandType.StoredProcedure;
aCommand.Parameters.Add(new SqlParameter( "@USER_ID ", SqlDbType.VarChar, 20));
aCommand.Parameters[ "@USER_ID "].Value = user_id;
aCommand.Parameters.Add(new SqlParameter( "@USER_PWD ", SqlDbType.VarChar, 20));
aCommand.Parameters[ "@USER_PWD "].Value = user_pwd;
aCommand.Parameters.Add(new SqlParameter( "@TYPE ", SqlDbType.Decimal));
aCommand.Parameters[ "@TYPE "].Direction = ParameterDirection.Output;
aCommand.Parameters.Add(new SqlParameter( "@F_LEM ", SqlDbType.Decimal));
aCommand.Parameters[ "@F_LEM "].Direction = ParameterDirection.Output;
aCommand.Parameters.Add(new SqlParameter( "@LP_INFO ", SqlDbType.VarChar, 200));
aCommand.Parameters[ "@LP_INFO "].Direction = ParameterDirection.Output;
aCommand.UpdatedRowSource = UpdateRowSource.None;
aCommand.ExecuteNonQuery();
aCommand.Dispose();
conn.Close();
int user_type = Convert.ToInt32(aCommand.Parameters[ "@TYPE "].Value.ToString());
string f_lem