In the process of writing WEB applications, we often have to deal with databases, such as the database ACCESS, SQL SERVER, which we often use in daily life. When connecting these databases, the system often gives us some errors like 80004005, which are very troublesome. In order to facilitate netizens to solve this kind of problem, this article will introduce and answer these questions in detail.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access 97 Driver] The Microsoft Jet database
engine cannot open the file '(unknown)'. It is already opened exclusively
by another user, or you need permission to view its data.
[reason]
This error occurs when IIS uses an anonymous account (usually IUSR), which is in NT for the directory where the database is located
There is no correct permission.
[Solution]
1. Check the permissions of files and directories. Ensure that Evryone has permission to create and delete temporary files in this directory.
2. Check whether the data source file (DSN) is in use by other program flags. These programs are generally Visual InterDev, closing any project that is opening and connecting to the database in InterDev.
3. Check whether a table in ACCESS is connected to a network server at this time.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access 97 Driver] Couldn't use '(unknown)'; file
already in use.
[reason]
To connect to the ACCESS database, it is being used to lock the database, resulting in inaccessibility.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified.
[reason]
The possible reason is that the Application connection string initialized by ConnectString in global.asa, but the global.asa file does not work properly at this time.
[Solution]
Check whether the assignment is correct, add the following code to asp:
<%= 'auth_user' is & request.servervariables(auth_user)%>
<P>
<%= 'auth_type' is & request.servervariables(auth_type)%>
<P>
<%= connection string is & session(your_connectionstring)%>
<P>
Another reason is that spaces are added to ConnectString, for example
DSN = MyDSN; Database = Pubs;
Try changing it to the following:
DSN=MyDSN;Database=Pubs;
If global.asa has not been run yet, check whether the file is in the root directory of the application program, or in the root directory of the virtual directory.
There is also a possibility that the error occurs because the DSN name is not found, which can be solved by using the method I provided with id=36767. Finally, check whether the latest driver is installed, both the latest MDAC version.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not ??
[reason]
This error may occur in the order in which software is installed (or reversely installed) on your computer. This error will occur if the ODBC version is inconsistent.
[Solution]
The solution is to install the latest version of MDAC.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Access 97 ODBC driver Driver]General error Unable to open
registry key 'DriverId'.
[reason]
This error occurs when reading a value from the registry. Use regedit32.exe to check the permissions of the registry.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][dbnmpntw]ConnectionOpen (CreateFile()).
[reason]
One reason: This can also happen on the same machine when a database contains permission relationships that are not used separately, when a UNC path is set for one relationship, while the other relationship is a local path.
The second reason: When a user logs in with an anonymous account in IIS, he has permission to the local machine, but for a UNC path machine, the machine will not consider that your current anonymous account is in it. That's also legal. This way it does not allow you to access the resources on it, resulting in an error.
[Solution]
1. In the IIS tool, change the IIS anonymous account to another domain-based account. (That is, do not use anonymous login)
2. Or create an account with the same current anonymous account on the machine you want to access the resources, using the same password.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005' Microsoft][ODBC
Microsoft SQL Driver] Logon Failed()
[reason]
This error is generated by SQL Server. When it does not accept or recognize the login account, or it does not log in with an administrator.
It may also be caused by the lack of SQL allusion account in NT.
[Solution]
Log in with the System Administrator Account (SA), the general password should be empty. Note that CoonectString must be used at this time and DSN files cannot be used. Because the username and password are not saved in DSN. Check whether NT maps an account to SQL.
[error message]
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed- User: Reason:
Not defined as a valid user of a trusted SQL Server connection.
[reason]
This error is generated by SQL Server. When it does not accept or recognize the login account, or it does not log in with an administrator.
It may also be caused by the lack of SQL allusion account in NT.
[Solution]
In the Enterprise Manager of SQL Server, select Server/SQL Server/Configure[ASCII
133]/Security Options/Standard. If running in IIS4, deselect the Password Synchronization option for the project.
[error message]
Microsoft OLE DB Provi