高分求帮助!服务器运行网站出错 IndexOutOfRangeException: 无法找到表 0
RechargeDAL.UserInfoDAL.Login(String UserID, String UserPass) in RechargeDAL\UserInfoDAL.cs:23
这是服务器上出错的位置!
DAL里面出错的方法
public DataView Login(string UserID, string UserPass)
{
string sql = string.Format("select * from UserInfo where UserID='{0}' And UserPass='{1}'", UserID, UserPass);
DataView dvCount = SqlHelper.GetDv(sql); //23行
return dvCount;
}
页面调用
string UserID = RechargeUtils.Common.Utils.ChkSQL(txtScreenName.Text);
string userPass = RechargeUtils.Common.Utils.MD5(RechargeUtils.Common.Utils.ChkSQL(txtPassword.Text));
DataView dvUser = user.Login(UserID, userPass);
if (dvUser.Count > 0)
{
Response.Redirect("User.aspx");
}
以上段代码,我在本机调试可以正常执行。为什么发布到服务器上之后就报错呢?
求指点,解决立马给分!