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\te
st.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_M
ilitary)='
c')) "
End if
If strReportOption = "M" then
strReportOption = "WHERE (((Airline_Details.Civil_M
ilitary)='
m')) "
End if
If StrReportOption = "A" then
strReportOption = ""
End if
' Sets the long SQL code to various variables
SQL1 = "SELECT Airline_Details.Civil_Mili
tary, Airline_Details.Sales_Regi
on, 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_Regi
on, 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
.Connectio
n")
objConn.Open Application("strConnect")
'Connect to recordset table, by using SQLQryReport1 as a sort of query.
Dim objRec
Set objRec = objConn.Execute(SQLQryRepo
rt1)
%>
<!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</fo
nt></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
%>