我的SQL语句写的对吗?为什么总提示我FROM子句语法错误??
protected void LogButton_Click(object sender, EventArgs e)
{
string userid, pwd;
userid = Userid.Text;
pwd = Pwd.Text;
string mySel = "select count(*) as iCount from user where Userid= " + " ' " + userid + " '; ";
OleDbCommand myCmd1 = new OleDbCommand(mySel,myConn);
myCmd1.Connection.Open();
OleDbDataReader Dr1;
Dr1 = myCmd1.ExecuteReader();
Dr1.Read();
string count = Dr1[ "iCount "].ToString();
Dr1.Close();
myCmd1.Connection.Close();
string drPwd;
if (count != "0 ")
{
mySel = "select * from user where Userid= " + " ' " + userid + " '; ";
OleDbCommand myCmd = new OleDbCommand(mySel, myConn);
myCmd.Connection.Open();
OleDbDataReader myDr = myCmd.ExecuteReader();
myDr.Read();
drPwd = myDr[ "password "].ToString();
myDr.Close();
myCmd.Connection.Close();
if (drPwd == pwd)
{
Session[ "loginID "] = userid;
Response.Redirect( "main.aspx ");
}
else