62,242
社区成员




private bool Check(string username, string xh)
{
bool boolReturnValue = false;
String OleDbConnectiong = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=";
OleDbConnectiong += Server.MapPath("1111.mdb");
OleDbConnection Connection = new OleDbConnection(OleDbConnectiong);
String strSQL = "select count(*) from xh where username='" + username + "'and xh='" + xh + "'";
OleDbCommand command = new OleDbCommand(strSQL, Connection);
Connection.Open();
object o = command.ExecuteScalar();
Connection.Close();
boolReturnValue = Convert.ToInt32(o) == 0 ? false : true;
return boolReturnValue;
}