When using ASP.NET to connect to the ACCESS database under IIS7, the following error handling method is displayed:

  
“/” Server error in the application.
The program is not registered on the local computer & ldquo;microsoft.jet.oledb.4.0”.
This is because the Win2008 system we use is 64-bit. Previously Win2003 was 3 digits. There are two solutions: 1. Modify the code to connect to the database: If the original code is DataPath = "App_Data/#data.mdb";String constring = "provider=microsoft.jet.oledb.4.0;data source=" ; + HttpContext.Current.Server.MapPath(DataPath) + ""; Modified: DataPath = "App_Data/#data.mdb";string constring = "provider=Microsoft.ACE.OLEDB.12.0; Data source=" + HttpContext.Current.Server.MapPath(DataPath) + ""; Note: You only need to change to the red font part, and the others do not need to be modified. That is to say, a driver that connects to the database.


Copyright © Windows knowledge All Rights Reserved