[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Provider error '80004005' in ASP page using Access database

Posted on 2008-02-06
8
Medium Priority
?
550 Views
Last Modified: 2008-02-19
I have an ASP page that performs a SQL search in an Access database.  I enter a search term and it works once.  Then I hit the back button and try again and it gives me the below error.
Provider error '80004005' 
 
Unspecified error 
 
/process.asp, line 17

Open in new window

0
Comment
Question by:Tony789
  • 5
  • 3
8 Comments
 

Author Comment

by:Tony789
ID: 20834733

set conn = server.CreateObject("ADODB.Connection")
conn.ConnectionString = "DSN=Test.dsn"
conn.open  <--------------------------------------Line 17
 
set rs = server.createobject("ADODB.Recordset")
rs.Open "Table1", conn, , , adCmdTable
bolFound=False
 
set rs1 = server.createobject("ADODB.Recordset")
rs1.Open "Table2", conn, , , adCmdTable

Open in new window

0
 

Author Comment

by:Tony789
ID: 20834769
I have also closed the recordsets and connection.
0
 
LVL 82

Expert Comment

by:hielo
ID: 20834849
Instead of using a DSN, use a DSN-less connection:

set conn = server.CreateObject("ADODB.Connection")
conn.open("Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("test.mdb"))
set rs = server.createobject("ADODB.Recordset")
...
You would need to provide the correct db name.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:Tony789
ID: 20834892
I have been using DSN connections before and have never encountered this problem.  What is causing this now?
0
 
LVL 82

Expert Comment

by:hielo
ID: 20834992
Not sure what would be the cause. The following article outlines quite a few:
http://tutorials.aspfaq.com/8000xxxxx-errors/80004005-errors.html

FYI: Some time ago I ran into this:
http://www.powerasp.com/content/database/dsn_vs_dnsless.asp

among others, and have not used DSN since.
0
 
LVL 82

Accepted Solution

by:
hielo earned 500 total points
ID: 20835116
Out of curiosity, see try changing this:
set conn = server.CreateObject("ADODB.Connection")
conn.ConnectionString = "DSN=Test.dsn"

to this:
set conn = server.CreateObject("ADODB.Connection")
conn.Mode = 3
conn.ConnectionString = "DSN=Test.dsn"
0
 

Author Comment

by:Tony789
ID: 20835155
Awesome!  I added conn.Mode=3 and it is working correctly.

Thanks for your help.
0
 

Author Comment

by:Tony789
ID: 20930834
hielo,

Sometimes it works when I have conn.Mode=3 but sometimes it suddenly fails.  Then I remove conn.Mode=3 and it works again correctly.

Any suggestions?

Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

612 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