Solved

Provider error '80004005'

Posted on 2003-11-21
12
74,006 Views
Last Modified: 2011-08-18
Provider error '80004005'

Unspecified error

/submitresults.asp, line 46

Hello,

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
Response.clear

'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
' SQL
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">
<html>
<head>
<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">
</head>


<body>

<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>
      <TD>Type</TD>
      <TD>Aircraft</TD>
    </TR>
    <%
      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>"
        objRec.MoveNext
      Wend
  %>
  </table>
  </html>

<%
' Closes Everything down
objRec.close
set objRec=nothing
objConn.close
set objConn=nothing
%>

 
0
Comment
Question by:yo_daz_uk
12 Comments
 
LVL 2

Accepted Solution

by:
devaid earned 100 total points
Comment Utility
It usually means that either incorrect permissions are set on the server.

http://www.webwizguide.info/asp/faq/access_database_faq.asp
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
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.

FtB
0
 
LVL 46

Expert Comment

by:fritz_the_blank
Comment Utility
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:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q306518


FtB
0
 

Author Comment

by:yo_daz_uk
Comment Utility
Cheers,

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.
0
 
LVL 4

Expert Comment

by:Iguanasan
Comment Utility
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
0
 
LVL 1

Expert Comment

by:sean__sean
Comment Utility
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.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Expert Comment

by:knightmare007
Comment Utility
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.
0
 

Expert Comment

by:vilasrm
Comment Utility
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.
0
 

Expert Comment

by:Dharmanathf
Comment Utility
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.

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

Expert Comment

by:fritz_the_blank
Comment Utility
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.

FtB
0
 

Expert Comment

by:mjwerner
Comment Utility
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?
0
 

Expert Comment

by:mjwerner
Comment Utility
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
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 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

11 Experts available now in Live!

Get 1:1 Help Now