大哥们,前辈们,快来帮忙啊!
OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OlEDB.4.0;Data Source="+Server.MapPath("Data.mdb"));
int count=0;
OleDbCommand com=new OleDbCommand("select count(*) from usersTable where userName='"+strName+"'and userPwd='"+strPwd+"'",con);
com.Connection.Open();
com.ExecuteNonQuery();
if(count>0)
{
com.Connection.Close();
return true;
}
else
{
com.Connection.Close();
return false;
}
用这个连接数据库,查询用户名或密码是否存在
怎么总是出错呀!
急了 , 求求 各位 来给帮帮忙啊!