ASP learning: how to handle error 80004005

Source: Internet
Author: User
Tags driver manager dsn sql server driver odbc sql server driver
1. error information (I do not need to translate the error information into Chinese. Thank you for your understanding)
Microsoft ole db provider for ODBC drivers error '000000'
[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:

This error occurs when IIS uses an anonymous account (usually IUSR) and the account does not have the correct permission for the database directory in NT. (This is why there is no problem in Win95 and PWS, because Win95 has no directory permission at all.) Check the file and directory permissions. make sure that you have the permission to create and delete temporary files in this directory.

These temporary files are actually files created in the same directory of the database, but note that these files may
It may also be created in another directory, such as/winnt.

What directory is accessed when an NT file monitoring program fails to monitor the file.
This nt File Monitor can download http://www.sysinternals.com in this place.

If you use a network address for the database, such as a ing address, check the permissions of shared files and directories,

Check whether the data source file (DSN) is marked as in use by other programs,
These other programs are generally Visual InterDev, which closes any project in InterDev that is connecting to the database.

This error may also occur in this case: If a UNC path (generic naming Protocol) is used in the DSN, use the local path for testing, this is because an error may occur if you use UNC for a local database.

This may also happen if the server wants to access a table in access, but the table is connected to a network server.

2. error message:

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [ODBC Microsoft Access 97 driver] couldn't use '(unknown)'; File
Already in use.

Cause:

The database is locked when multiple users use it.

3. error message:

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [ODBC driver manager] data source name not found and no default
Driver specified.

Cause:

The most likely cause is that connectstring is a session variable initialized in global. Asa, but global. asa
But not working properly. The solution is to check whether the assignment is correct: (Add the following code to your asp)

Another reason is that you add extra spaces to your connectstring, such

DSN = mydsn; database = pubs;
Try to change it to the following:
DSN = mydsn; database = pubs;

If global. ASA is not working, check whether the file is in the root directory of the application or the root directory of the virtual directory.

The possible cause of the error is that the DSN name is not found, which can be solved by the id = 36767 method provided by me.
Finally, check whether the latest driver is installed, that is, whether it is the latest MDAC version.

4. error message

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [ODBC driver manager] data source name not ??

Cause:

This error may occur in the software installation (or reverse installation) sequence on your computer.
This error occurs if the ODBC version is inconsistent.
The solution is to install the latest version of MDAC.

5. error message:

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [ODBC Access 97 ODBC driver Driver] General error Unable to open
Registry Key 'driverid '.

Cause:

This error occurs when love reads a value from the registry. Use regedit32.exe to check your registry permissions.
You can also use the registry Monitoring Program (ntregmon) in NT to view the failed reading information. The program finds it here: http://www.sysinternals.com

6. error message:

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [odbc SQL Server Driver] [dbnmpntw] connectionopen (createfile ()).

Cause:

Two reasons: When a database contains a license relationship that is independent of machines,
This may also happen on the same machine. When you set a UNC path for a link, the other link is a local path.
The cause of the error is:

After a user logs on using an anonymous IIS account, the user has the right to log on to the local machine, but for a machine with a UNC path, in addition, this machine does not think that the account you are currently logged on anonymously is also valid on it. In this way, it does not allow you to access the resources above it, resulting in errors.

Two solutions:

1. in IIS tools, change the IIS Anonymous account to another domain-based account. (That is, do not use anonymous logon)
2. or create an account on the machine on which you want to access the resource and use the same password as the current anonymous account.

7. error message

Microsoft ole db provider for ODBC drivers error '000000' Microsoft] [ODBC
Microsoft SQL driver] Logon Failed ()

Cause:

This error is generated by SQL server. If it does not accept or cannot recognize this Logon account, or does not log on as an administrator, it may also be caused by the absence of an SQL shadow account in NT.

Use the system administrator account (SA) to log on. Generally, the password should be blank. Note that you must use the coonectstring instead of the DSN File.

Because the user name and password are not saved in DSN.
Check whether nt maps an account to SQL.

8. error message

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [odbc SQL Server Driver] [SQL Server] Login Failed-user: reason:
Not defined as a valid user of a trusted SQL server connection.

Cause:

The reason is the same as above.
Z
Try this method: in Enterprise Manager of SQL Server, Select Server/SQL Server/configure [ASCII
133]/security options/standard.
If it is running In IIS4, deselect the password synchronization option for this project.

9. error message

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [ODBC Microsoft Access 97 driver] Couldn't lock file.

Cause:

Maybe you do not have the correct permission to generate the ACCESS database lock file (. LDB)
By default, the file is in the same directory as your database.
Grant the anonymous account full permission to access the database shared directory.

Sometimes it is because the file is intentionally used for read-only permission sharing. Try the following code.
Set conn = server. Createobject ("ADODB. Connection ")
Conn. mode = admodesharedenywrite '8

10. error message

Microsoft ole db provider for ODBC drivers error '000000'
[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 is invalid. Most likely, this occurs when global. Asa and coonecntstring are used on another machine.

11. error message

Microsoft ole db provider for ODBC drivers error '000000'
[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 and has restrictions on the query.

12. error message:

Microsoft ole db provider for ODBC drivers error '000000'
[Microsoft] [odbc SQL Server Driver] [dbmssocn] General network error. Check
Your network document

Cause:

When the machine with SQL Server is renamed. However, DSN also uses the original machine name.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.