Saturday, 10 November 2012

Microsoft OLE DB Provider for ODBC Drivers Error '80040e4d'

Sometimes when we are trying to connect to the SQL Server 2008 R2 via ASP, the website throws an error message like "Microsoft OLE DB Provider for SQL Server error '80040e4d' 
Login failed for user 'username'. 
/test.asp, line 6" 
So, the solution to this error is very simple:

1-Open the SQL Server 2008 R2.
2-In SQL Server Management Studio object explorer, right-click the server, and then click properties.

3-Server properties panel will appear on your screen,on the left panel click on the Security page, under Server authentication, select the SQL Server and Windows authentication mode, and then click OK.

4-In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.

5-In Object Explorer, right-click your server, and then click Restart. If SQL Server Agent is running, it must also be restarted.

6-Now to enable the 'username' Login, go to the Object Explorer, expand Security, expand Logins, right-click username, and then click Properties. On the General page, you might have to create and confirm a password for the login.On the Status page, in the Login section, click Enabled, and then click OK.

7-After that just refresh the server.


  1. great!, thank you

  2. Perfect!
    I was not able to get my website to read my database, this fixed it!

  3. that did it for me too. the folks doing support at my hosting provider are pretty good, but this did not occur to them.

  4. Great..Thank you very much..

  5. thank you very much <3