Provider error '80040e4d'

Posted on 2007-09-28
Last Modified: 2013-12-25
My code is generating the following error(on the connection string line):

Provider error '80040e4d'
Authentication failed.

dim conn, rs, sql, connstr
set conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
connstr = "Microsoft.Jet.OLEDB.4.0;Data Source=" &_
response.write(Server.MapPath("ts2incentives.mdb")) &_
";User ID=ts2incentives;Password=Passw0rd;" connstr
sql = "select * from PINs;"
set rs = conn.Execute(sql)
Question by:mjoesting
    LVL 16

    Expert Comment

    by:Haripriya Sathiish
    Try this:

    connstr = "Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(".") & "\ts2incentives.mdb";User ID=ts2incentives;Password=Passw0rd;"

    Author Comment

    This code worked for me:

    dim conn, rs, sql, connstr
    set conn = Server.CreateObject("ADODB.Connection")
    connstr="Driver={Microsoft Access Driver (*.mdb)};" &_
          "filedsn=d:\hosting\ts2incentives\test\access_ts2incentives.dsn;" &_
          "DBQ=d:\hosting\ts2incentives\test\ts2incentives.mdb;" &_
          "UID=ts2incentives;PWD=Passw0rd;" connstr
    sql = "select * from PINs;"
    LVL 1

    Accepted Solution

    PAQed with points refunded (50)

    EE Admin

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now