Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Provider error '80004005'

Posted on 2003-11-21
Last Modified: 2011-08-18
Provider error '80004005'

Unspecified error

/submitresults.asp, line 46


I see that this is quite a common problem but no one seems to have an answer, searching on google groups.  So i thought i would put it up on here.

I have a page that is linked to an Access database.  the page runs a query then displays the data upon the page.  The query has 3 different options it could be, so therefore there is a page before using radio buttons to select which they would like to use.  This passes info to this sheet then this asp page shows the data, with a link at the top to return to the previous page.

Now yesterday this was working fine and dandy.  The code has not been touched but now it more often than not displays the aforementioned error when going from the selecting query page to the showing the results page.  

It does sometimes however display the page, but then shall not show it again.

Has anyone got any ideas, my code is below .........

<%@ LANGUAGE = VBScript %>
<% Option Explicit %>

<!-- #include file="adovbs.inc" -->

Application("strConnect") = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=D:\webhost\Helpdesk\test.mdb"
'Buffer output until asp scripts have completed
Response.buffer = True

'Turn caching off
Response.Expires = 0
' Above code should be on every page
Dim strReportOption, SQL1, SQL2, SQL3, SQL4, SQLQryReport1
strReportOption = Request.Form("radiobutton")

' Sets the where as clause if needed in the variable so can be added to the
If strReportOption = "C" then
  strReportOption = "WHERE (((Airline_Details.Civil_Military)='c')) "
End if
If strReportOption = "M" then
  strReportOption = "WHERE (((Airline_Details.Civil_Military)='m')) "
End if
If StrReportOption = "A" then
  strReportOption = ""
End if

' Sets the long SQL code to various variables
SQL1 = "SELECT Airline_Details.Civil_Military, Airline_Details.Sales_Region, Aircraft_Type.Type, Cust_Info.Aircraft "
SQL2 = "FROM Airline_Details INNER JOIN (Aircraft_Type INNER JOIN Cust_Info ON Aircraft_Type.Type = Cust_Info.Type) "
SQL3 = "ON Airline_Details.Airline = Cust_Info.Airline "
SQL4 = "ORDER BY Airline_Details.Sales_Region, Aircraft_Type.Type;"

' Sets the actual query for the database
SQLQryReport1 = SQL1 & SQL2 & SQL3 & strReportOption & SQL4

' ******Database
' Connect to ... "strConnect is a global variable which is set in the
' global.asa file and is set to the location of the database
' Connected to recordset table
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open Application("strConnect")

'Connect to recordset table, by using SQLQryReport1 as a sort of query.
Dim objRec
Set objRec = objConn.Execute(SQLQryReport1)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">
<link href="styles2.css" rel="stylesheet" type="text/css">


<p> <a href="default.htm"><font color="#0000FF">Return</font></a> </p>
<table width="100%" border="0" cellspacing="0" cellpadding="5" height="246">
<td height="300" align="center" valign="top"> <table width="455" height="49" border="1" cellpadding="3" cellspacing="1" bordercolor="#000000" bgcolor="#FFFFFF">
    <TR class="Header">
      <TD>Civil / Military</TD>
      <TD>Sales Region</TD>
      Dim intPos
      intPos = 1
      'Display usernames, week and total scores in table
      While NOT objRec.EOF
        Response.Write "<TR class='table'><TD>" & objRec("Civil_Military") & "</TD>"
        Response.Write "<TD>" & objRec("Sales_Region") & "</TD>"
        Response.Write "<TD>" & objRec("Type") & "</TD>"
        Response.Write "<TD>" & objRec("Aircraft") & "</TD></TR>"

' Closes Everything down
set objRec=nothing
set objConn=nothing

Question by:yo_daz_uk

Accepted Solution

devaid earned 100 total points
ID: 9796571
It usually means that either incorrect permissions are set on the server.

LVL 46

Expert Comment

ID: 9796649
strDataPath = "D:\webhost\Helpdesk\test.mdb"
Application("strConnect")  = "Provider=Microsoft.Jet.OLEDB.4.0;"_
                  + " Data Source= " & strDataPath & ";"_
                  + " Mode=Share Deny None;User Id=admin;PASSWORD=;"

Might help with your problem.

LVL 46

Expert Comment

ID: 9796662
I would ordinarily agree with devaid but if it works sometimes, but not all of the time, that makes me wonder if it really is a permissions issue.

If the string above does not help, take a look at this:


Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 9796778

it was something to do with IIS Management lockdown wizard, and it had denied web anomynous rigths.

Im a beginner and not to sure what this means, but that is what my boss told me :-)

I think he thought of it because of me saying it could be the permissions after reading What devida had put.

Expert Comment

ID: 9796812
For future reference, always ask yourself: "What has changed?"  It has been a VERY RARE case when NOTHING has changed and the code starts doing strange things.  In fact, I'm not sure I can remember a single instance when NOTHING has changed.

Regards, Iguanasan

Expert Comment

ID: 13188571
I had a similiar issue.

Believe it or not it was some kind of MS error, that is fixed changing the order in which the fields are retrieved from the database.
Eg: you are accesing first to "Civil_Military", then to "Sales_Region", and so on.
Try to to create auxiliary variables and call first "Sales_Region", then "Civil_Military", etc.

It worked for me.
Play a little bit with the fields order until no error is risen.

Hope it'll work for you too.

Expert Comment

ID: 13394748
Some of this thread is old (2003), but I see a new post and thought I'd post myself for others searching on this error code.

I just had this issue myself.  In fact, no code at all had been modified.  The only thing changed is that I was editing a single field in the database (unchecking a "completed" check box so that our record would reappear in an active view).  I've done this a dozen times over the last few years without any issue.  This time, I was receiving this error.

The referenced line number in the ASP code on multiple pages was the same DIM command, so I got the feeling that this had to do with non-released memory registers.  I stopped and restarted the IIS service on the server and cleared this right up.

Hope this helps anyone with problem.

Expert Comment

ID: 13622085
If you are having issues with uploads with file sizes greater than 200K and are running IIS 6.0, try these solutions first: open up the file "metabase.xml" with notepad...should be located in C:\windows\sytem32\inetserv. Find the variable named "AspMaxRequestEntityAllowed", it's set at 204800 (200K) and change it to the desired size.  
For downloading Find the variable named "AspBufferingLimit" and change it to something greater than what is there. By default this is set to around 4 megs. By changing this variable you are increasing the max size of ASP response buffer, thus letting you download files greater than 4 megs. By increasing the number of these variables, you can controll the size of uploads and downloads (respectively).

A NOTE: Before making changes to this file. You must first go to IIS and right click the server and select properties. Check the box that says allow changes to MetaBase configuration while IIS is running. If you don't you will find that the metabase.xml file is locked. For good house cleaning you should go back and uncheck this after making your changes.

Expert Comment

ID: 15062108
coming back to the main thread why this was opened since none of the solutions above worked for me.

I faced the same problem Provider error '80004005' on win 2003 standard edition with access Db.

I also faced the same intermitant problem that the site works fine for few minutes and then again throws error.

The problem existed even when permissions were set proper (anonymous internet user for the domain)

The soultion i discovered was

I copied the mdb file to a new folder /db2458dv (alpha numeric name so someone cannot missuse the permission)  and gave the anonymous write permission to the folder instead of only the file and let the permission flow down and it worked.

hope this helps someone.

<a href="http://skywebindia.com">web hosting india</a>
LVL 46

Expert Comment

ID: 15062225
Oh sure, That has to happen because an .ldb file is created and destroyed. If you don't have WRITE permissions, it is all over.

As an aside, I have found on Windows 2003 server that if you upload a copy of the database to the same directory, it doesn't always inheret the permissions and then you will need to reset them.


Expert Comment

ID: 15131139
I am experiencing the same problem.
I have tried restarting IIS and still no luck.
What is IIS Management lockdown wizard, and how do you access it?

Expert Comment

ID: 15131148
Spoke too soon.
Have just managed to fix this problem by copying the mdb file, deleting the original and renaming the copy as the original. Job done

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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