Access database common problem handling

Published: 2004-03-20

1. When opening the website, it keeps loading until timeout, or prompts database connection failure:
This usually occurs when the database is locked up. Check whether an .ldb file exists in the database directory used by the website (generally, the program uses the on error resume next statement; comment it out). Solution:
(1) Restart the process pool. If it occurs frequently, it is recommended to contact the program provider or developer for debugging and optimization, or switch to an mssql database; if it occurs occasionally, restart the process pool/change the application pool.
(2) Some website code itself has problems, causing the database to lock up as soon as it is accessed. The solution is to contact the program developer to repair or optimize the database, or switch to an mssql database.
Methods for repairing the acc database:

xiufu.jpg


2. The “microsoft.jet.oledb.4.0” provider is not registered on the local computer, orthe provider was not found. The program may not be installed correctly.

This is because the Win2008 system we use is 64-bit, whereas previously Win2003 was 32-bit. There are two solutions:

     1. Modify the code for connecting to the database:
For example, the original code is
DataPath = "App_Data/#data.mdb"; 
String constring = "provider=microsoft.jet.oledb.4.0;data source=" + HttpContext.Current.Server.MapPath(DataPath) + "";
The modified code is:
DataPath = "App_Data/#data.mdb";
string constring = "provider=Microsoft.ACE.OLEDB.12.0;data source=" + HttpContext.Current.Server.MapPath(DataPath) + "";
Note: Only the part in red font needs to be modified; no other changes are needed. In other words, use a different driver to connect to the database
.


2.  In our backend, change to 32-bit compatibility mode:

Log in to our website backend and enter the management center Business ManagementàVirtual Host ManagementàManageàProgram Compatibility Mode

201282211161355392.gif

3. File not found 

Microsoft JET Database Engine error '80004005' File not found  'd:\wwwroot\xxxx\wwwroot\2.MDB'

   This situation is generally caused by an incorrect path/a database name inconsistent with the setting in the program, etc. Just modify it.


4. Unrecognized database format 'd:\wwwroot\szrxdg\wwwroot\App_Data\hmxdata.mdb'.

    This is generally caused by an incomplete database file upload, a corrupted file, etc. Just re-upload it.


5. Cannot open registry key

   Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

   [Microsoft][ODBC Microsoft Access Driver]Common error: Cannot open registry key 'Temporary (volatile)  Jet DSN for process 0x1844 Thread 0x1b40 DBC 0x554cc59c Jet'.
 
  This is caused by database connection failure. First, check whether the path for connecting to the database in conn.asp is correct, and check whether the database actually exists. If the database already exists and the path in the connection program has no errors, please re-upload the local access database once.

  If the database on the server is the latest and re-uploading cannot solve the problem, download the database on the server to your local computer, open your database with    access2000, then use Repair Database in Tools to repair it once, and re-upload it.

  Additionally, if it is a server, check whether the permissions for the temporary directory are set too low; just add Everyone.