Microsoft Knowledge Base Email Alertz

(306586) - When use ActiveX Data Objects (ADO) through Active Server Pages (ASP) to connect to Microsoft SQL Server, you may receive the following error message: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver][SQL...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 306586 - Last Review: August 11, 2006 - Revision: 4.3

PRB: Troubleshooting Error 80004005 "Login Failed" in ASP

This article was previously published under Q306586

SYMPTOMS

When use ActiveX Data Objects (ADO) through Active Server Pages (ASP) to connect to Microsoft SQL Server, you may receive the following 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

There are two reasons why this error may occur:
  • Integrated security is turned on in the SQL Enterprise Manager, and the Microsoft Windows NT account that is being used has not been mapped to a SQL account.
  • The User ID in the connection string is invalid or blank.

RESOLUTION

To resolve this problem, ensure that the following conditions are met:
  • The Windows NT account is mapped to a SQL account.
  • The User ID in the connection string is valid and is not blank.
  • Set standard security in SQL Server Enterprise Manager. To implement SQL Server standard security, follow these steps:
    1. From SQL Enterprise Manager, right-click the SQL Server name that appears in the Server Manager window, and then click Properties. (For SQL Server version 6.5 click Configure).
    2. Click Security Options, and then click Standard and Windows. (For SQL Server version 6.5 click Standard).
  • The Password Synchronization option is turned off for that project if you are running under Microsoft Internet Information Server (IIS) 4.0.

STATUS

This behavior is by design.

REFERENCES

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
176380  (http://kbalertz.com/Feedback.aspx?kbNumber=176380/ ) HOWTO: Use ASP with a SQL Trusted Connection with Guest Account
307002  (http://kbalertz.com/Feedback.aspx?kbNumber=307002/EN-US/ ) PRB: ASP/ODBC/SQL Server Error 0x80040E4D "Login Failed for User '(Null)'"

APPLIES TO
  • Microsoft Active Server Pages 4.0
  • Microsoft Data Access Components 1.5
  • Microsoft Data Access Components 2.0
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.1 Service Pack 1
  • Microsoft Data Access Components 2.1 Service Pack 2
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.5 Service Pack 1
  • Microsoft Data Access Components 2.5 Service Pack 2
  • Microsoft Data Access Components 2.6
Keywords: 
kbprb KB306586
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

thanks Report As Irrelevant  
Written: 9/16/2004 10:22 AM
i am trying to connect ASP to SQL Database and i am getting this error "String data, right truncation "