Search code examples
c#ms-accessconnection

How to undo changes of framework change?


Recently, I've been working on a project with Access database, but since the deployment would be on a XP computer, I tried changing the .NET Framework from 4.5.1 to 4.

Since then the connection fails to open, and continues to fail even tough I changed it back to 4.5.1.

con.ConnectionString = "Provider = Microsoft.ACE.OLEDB.12.0;Data Source = " + Localexe + @"/Database.accdb";
try
{
    con.Open();
}
catch (Exception x)
{

}

It says that:

provider 'Microsoft.ACE.OLEDB.12.0' could not be found on the local machine

I tried opening a new project and seeing if there were any References that got lost on the process but that didn't seem to work.


Solution

  • What is your OS and its bit? what is your access bit? x86 or x64? anyway pls try : DefaultAppPool and Classic .NET AppPool (find these path) - right click - 32bit app enable(true)...after this , right click and restart. I guess it works.