I want to read the data from Access Database in order to check if a password is correct or not. I use this code:
var check=false;
OleDbCommand c = new OleDbCommand();
c.Connection = co //the connection to the Database;
c.CommandText = "select * FROM User Where user_name='"+usee+"'";
OleDbDataReader re = c.ExecuteReader();
while (re.Read())
{
if (re.ToString() == pasy)
{
check = true;
}
}
It gives me a "Syntax error in FROM clause." when the code executes.