Causes
Common error Unable to open the temporary (unstable) Ace DSN registry key for the process ...
This is the top-level error message generated by the Access Database Engine (aka "ACE") ODBC driver when the current process cannot open the Access database file for one of the following reasons:
Some other processes have opened the database "exclusively."
Some other processes initially opened the database file in Access as “shared” and has some pending structural modifications that require “exclusive” access to the file. Examples of pending changes are changes to the module code that have not yet been saved, or the presence of a form or report in the design view.
The account under which the current process is running does not have sufficient file system permissions to open the database file or the folder in which it is located.
The account under which the current process runs does not have sufficient permissions to access the values under the key HKLM\SOFTWARE\ODBC .
The database file simply does not exist.
When only the top-level error message is reported, the earlier ODBC "Jet" driver issued somewhat more intuitive error messages. When another process executed "Open Exclusive" in the file, the error message was
Unable to use '(unknown)'; the file is already in use.
and when the file had pending design changes, an error message reported
The database has been placed in a state by an unknown user, which prevents it from being opened or locked.
However, when we see only the top-level message created by the ACE ODBC driver, all we see is
Common error Unable to open the temporary (unstable) Ace DSN registry key for the process ...
This is because both drivers return several error messages, but they return them in a different order. Jet Messages ...
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] The database has been put into a state by an unknown user, which prevents it from being opened or locked.
ERROR [01000] [Microsoft] [ODBC Microsoft Access Driver] General warning Unable to open the registry key "Temporary (volatile) Jet DSN for process 0xed4 Thread 0x1204 DBC 0xab004 Jet".
ERROR Error [IM006] [Microsoft] [ODBC Driver Manager] SQLSetConnectAttr Error
ERROR [01000] [Microsoft] [ODBC Microsoft Access Driver] General warning Unable to open the registry key "Temporary (volatile) Jet DSN for process 0xed4 Thread 0x1204 DBC 0xab004 Jet".
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] The database has been put into a state by an unknown user, which prevents it from being opened or locked.
... and ACE messages:
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] General error Unable to open temporary Ace DSN registry key for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet.
ERROR Error [IM006] [Microsoft] [ODBC Driver Manager] SQLSetConnectAttr Error
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] General error Unable to open temporary Ace DSN registry key for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet.
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] The database has been put into a state by an unknown user, which prevents it from being opened or locked.
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] General error Unable to open temporary Ace DSN registry key for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet.
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] General error Unable to open temporary Ace DSN registry key for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet.
ERROR [HY000] [Microsoft] [ODBC Microsoft Access Driver] The database has been put into a state by an unknown user, which prevents it from being opened or locked.
Decision
Scenarios 1 and 2 (another process has an “exclusive” file lock):
Make sure the database file is not opened by any other process. ndash often this simply means shutting down the Access application itself - and then retry the ODBC operation from the external application. Rebooting your machine is one way to ensure that any other such processes have been terminated and they have abandoned their requirements for the database file.
Scenario 3 (insufficient file / folder permissions):
Either configure the permissions, or move the file to a folder where the user can open the file. Placing the database file in the root of the drive is a common cause of this type of problem.
Scenario 4 (insufficient permissions for the registry):
Adjust registry permissions to allow the account to access the HKLM\SOFTWARE\ODBC key. The most common reason in this case is because the IIS process runs under an account that does not have the usual "user" privileges. In this case, remember that you should not use Access databases with IIS anyway.
Scenario 5 (the database file does not exist):
Correct the connection string so that it contains a valid path to an existing file.