Link to home
Start Free TrialLog in
Avatar of yo_daz_uk
yo_daz_uk

asked on

Provider error '80004005'

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
%>

 
ASKER CERTIFIED SOLUTION
Avatar of devaid
devaid

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fritz_the_blank
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
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
Avatar of yo_daz_uk
yo_daz_uk

ASKER

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.
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
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.
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.
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.
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>
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
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?
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