大家看看这个问题吧
public bool insertUsers(string userName, string userPwd,string userxb,string userem){
SqlConnection con = Connection.getConnection();
SqlCommand cmd = new SqlCommand("insertUsers", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@userName", SqlDbType.VarChar, 20);
cmd.Parameters["@userName"].Value = userName;
cmd.Parameters.Add("@userPwd", SqlDbType.VarChar, 20);
cmd.Parameters["@userPwd"].Value = userPwd;
cmd.Parameters.Add("@userxb", SqlDbType.VarChar, 2);
cmd.Parameters["@userxb"].Value = userxb;
cmd.Parameters.Add("@userem", SqlDbType.VarChar, 20);
cmd.Parameters["@userem"].Value = userem;
con.Open();
cmd.ExecuteNonQuery(); //这里返回信息说行数太多,请教各位如何解决
con.Close();
return true;
}