I am trying to use an access database to create a login for a Hotel reservation system in C#, unfortunately I have run into a problem with the following error;
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
Most of the research I done with this was that people did not have Access installed on their machines. But as I do have it installed and still get this problem I am getting very confused over this. If anyone has any suggestions or solutions to this I would be grateful!
I am using a file reader class and for any of the methods in the class it always displays the error at the "Conn.Open()" command, here is my code for one of the methods.
public DataTable LoadLogin() { string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:"Not getting my connection string :p"; DataTable results = new DataTable();
using (OleDbConnection conn = new OleDbConnection(connString))
{
OleDbCommand cmd = new OleDbCommand("SELECT User_Name, Password FROM Employee", conn);
conn.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);
adapter.Fill(results);
}
return results;
}