SqlConnection conn=new SqlConnection("server=.;uid=sa;pwd=sa;database=yourdatabase")
SqlCommand cmd=new SqlCommand("libsearch",conn);
cmd.CommandType = CommandType.StoredProcedure;//指示libsearch为存储过程
cmd.Parameters.Add("@name",SqlDbType.Char,20);
cmd.Parameters["@name"].Value=传入name的值
cmd.Parameters.Add("@member_no",SqlDbType.Int,4);
cmd.Parameters["@member_no"].Value=传入member_no的值
cmd.Parameters.Add("@loancount",SqlDbType.Int,4);
cmd.Parameters["@loancount"].Direction=ParameterDirection.Output;
cmd.ExcuteNonQuery();//执行存储过程
string loancount=cmd.Parameters["@loancount"].Value.ToString()
//得到值.
SqlCommand cmd=new SqlCommand("libsearch",conn);
cmd.CommandType = CommandType.StoredProcedure;//指示libsearch为存储过程
cmd.Parameters.Add("@name",SqlDbType.Char,20);
cmd.Parameters["@name"].Value=传入name的值
cmd.Parameters.Add("@member_no",SqlDbType.Int,4);
cmd.Parameters["@member_no"].Value=传入member_no的值
cmd.Parameters.Add("@loancount",SqlDbType.Int,4);
cmd.Parameters["@loancount"].Direction=ParameterDirection.Output;
cmd.ExcuteNonQuery();//执行存储过程
string loancount=cmd.Parameters["@loancount"].Value.ToString()
//得到值.