INFO: Troubleshooting Guide for 80004005 & Other Error Messages

ID: Q183060


The information in this article applies to:


SUMMARY

This article presents details for common causes of the 0x800040005 error received by Microsoft Data Access Components (MDAC), including ActiveX Data Objects, OLE DB and the Remote Data Service (RDS). Several other error messages are discussed, including, 80040e21, 80040e14, and 80040e10.


MORE INFORMATION

The 80004005 error message can be summarized as "I couldn't get at your data for some reason." This article contains a listing of the various 80004005 error messages, the most frequent causes of the error messages, and troubleshooting steps to resolve them. While this article assumes you are using ActiveX Data Objects (ADO) within an Active Server Pages (ASP) page (.asp), the causes and many of the troubleshooting steps are applicable to any environment where ODBC is used for data access.

Error Message Listing

This section presents the text of each error message and the causes of each error.

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.

Cause

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.

Cause

The database cannot be locked correctly for multiple users. For more information, please refer to the following article in the Microsoft Knowledge Base:
Q174943 PRB: 80004005 "Couldn't Use '(unknown)'; File Already in Use"

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.

Cause

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not ??

Cause

This appears to be an issue with the order in which software is installed and uninstalled on the computer. If the ODBC core files become unsynchronized (they should all be the same version) you may see this error.

Install the latest version of MDAC (Microsoft Data Access Components) from the following Web site to update all the core ODBC drivers:
http://www.microsoft.com/data/

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'.

Cause

This error is caused by reading a value from the registry. Check the permissions on the registry key using the registry editor, Regedt32.exe. You may also want to use the Windows NT Registry Monitor to check for registry read failures. NTRegMon may be downloaded from the following Web site:
http://www.sysinternals.com

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver][dbnmpntw]ConnectionOpen (CreateFile()).

Causes

There are two causes for this error. Both errors are permission-related issues and involve a database that is either on a different computer from the Web server, or the database is possibly being referenced using a UNC path (\\Server\Share). Even if the database is on the same computer as the Web server, UNC paths make the database appear to the Web server to be on a different computer on the network.

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' Microsoft][ODBC Microsoft SQL Driver] Logon Failed()

Cause

This error is generated by SQL server if it does not accept or recognize the logon account and/or password being submitted (if using Standard security) or if there is no Windows NT account to SQL account mapping (when using Integrated security).

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.

Cause

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't lock file.

Causes

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access 97 Driver] '(unknown)' isn't a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

Cause

The path being read by the Web server is not a valid path. This most commonly happens when the Global.asa file is being used and the connection string was created on a different computer than the Web server. If the path is a mapped drive letter, it is probably only valid for the client computer that created the connection string.

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver][SQL Server] The query and the views in it exceed the limit of 16 tables.

Cause

The query is too complex. There are several limitations on a query.

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver][DBNMPNTW] ConnectionWrite (GetOverLappedResult()).

Cause

When the allow Anonymous User context is turned off, Windows NT is closing the pipe to SQL Server after the first request is complete. This is because the first connection to SQL Server is made under the IIS Anonymous User account. IIS then either impersonates the browser client on that same thread, or tries to access the connection on a different thread that is running in the impersonated user context. In either case, Windows NT would detect the attempt to use a network named pipe handle that had been opened in a different user context and force the pipe closed, per its security rules. When the connections are viewed on the SQL Server with a network monitor, a name pipe close request comes from Windows NT, causing the error in the Web browser.

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver][DBMSSOCN] General network error. Check your network document

Cause

This may occur when a SQL server computer is renamed. DSNs that reference the old name fail when the computer name cannot be located.

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80040e21' Errors occurred

Cause

This may be caused by trying to insert more data into a field than is allowed. For example, inserting 26 characters into a Microsoft Access field that is formatted to accept only 25 characters.

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in INSERT INTO statement.

Cause

A column name may be a reserved word, such as DATE. Change the column name to a non-reserved name, such as "SaleDate".

Error Message

Microsoft OLE DB Provider for ODBC Drivers error '80040e10' [Microsoft][ODBC Microsoft Access 97 Driver] Too few parameters. Expected 1.

Cause

The column name used in the query syntax does not exist. Often this is just a typographical error. Check the column names in a database against your query string. If you are using Microsoft Access, make sure that the actual column name is used and not a column's "display" name.


REFERENCES

For information on enabling Visual InterDev to work from a remote workstation, set up the system DSNs as described in the following Microsoft Knowledge Base article:

Q178215 HOWTO: Configure VID to Work with an Authenticated Web Project
Q174943 PRB: 80004005 "Couldn't Use '(unknown)'; File Already in Use"

Q173742 BUG: Global.asa Not Executed If Restricting Web Access

Q172864 ASP Pages Fail on Access to Session and Application Objects

Q156526 General Error=51 Connecting to an Access Datasource

Q175671 PRB: 80004005 ConnectionOpen (CreateFile()) Error Accessing SQL

Q149425 IDC: Error Performing Query, Not Defined as a Valid User

Q167452 PRB: 'Not a valid path' Error when Using Access Data Source

Q125767 PRB: Query Too Complex Error After Execution of SQL Query

Q166659 PRB: Accessing SQL Database Fails on Second Attempt

Q166029 PRB: Cannot Open File Unknown Using Access

Q178215 HOWTO: Configure VID to Work with an Authenticated Web Project

Additional query words:


Keywords          : kbADO100 kbADO150 kbADO200 kbDatabase kbODBC kbRDS150 kbRDS200 kbDSupport kbMDAC200 kbMDAC150 
Version           : WINDOWS:1.0,1.5,2.0; winnt:
Platform          : WINDOWS winnt 
Issue type        : kbinfo 

Last Reviewed: May 24, 1999