现象
A Microsoft OLE DB Provider for ODBC Drivers error - '80004005' Microsoft[ODBC Microsoft SQL Driver] Logon Failed() - occurs on a page with a recordset when the page is viewed through a browser or in Live Data mode.
理由
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).
解决方法
There are several things that may cause this ODBC error. Many of the possible reasons are listed in the table below.
If you are using standard security, the account name and password are incorrect. Try the system Admin account and password (UID= "SA" and NULL password). These must be defined on the connection string line.
DSN's do not store user names and passwords.
If you are using integrated security, check the Windows NT account that is calling the page, and find out what account (if any) it is mapped to.
SQL Server does not allow an underscore in a SQL account name.
If someone manually mapped the Windows NT IUSR_machinename account to a SQL account of the same name, it fails.
Map any account that uses an underscore to an account name on SQL that does not use the underscore.