Link to home
Create AccountLog in
Avatar of mjoesting
mjoesting

asked on

Provider error '80040e4d'

Experts;
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;"
conn.open connstr
sql = "select * from PINs;"
set rs = conn.Execute(sql)
Avatar of CWS (haripriya)
CWS (haripriya)
Flag of India image

Try this:

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

ASKER

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;"
conn.open connstr
sql = "select * from PINs;"
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer