I have an Access database that is queried by pages on our local intranet. The database is accessed using a DSN connection. The pages are .asp pages, and the query is a SQL query.
The set-up worked fine while I was creating and formatting the first page, which I was going ot use as a template for the other pages. As I worked on the page, I kept changing format details and then refreshing it in my browser, with no problems. I worked on this pretty much all day yesterday with no issues. Then at the end of the day, I took the page and created two more pages with slightly different queries based on its structure.
Now, no matter which of the three pages I use, it will work fine the first time that it is viewed, but if refreshed, it will throw an error that says:
Provider error '80004005'
Unspecified error
/AVLkey.asp, line 37
The line referred to is:
Con.Open strConnect
strConnect has been previously set with the DSN info, thus:
strConnect="DSN=Vendor"
If I wait a few minutes before refreshing, the page usually then works fine. I don't understand how this happens, since I spent basically a whole day off and on refreshing the page (with sometimes just a few seconds between the refreshes) and it never threw the error. I also used to work for a ompany that used an access database for their website until the database got too big, and we never had trouble with it at that point, either.
What can be causing this issue? How can I fix it? Below is the entire section of code from the start of the connection to the finish, in case it helps:
listSQL="SELECT [Vendor Addresses].Vendor_Num, [Vendor Addresses].Vendor_Name, [Vendor Addresses].Vendor_Type, [Vendor Addresses].Survey_Faxed, [Vendor Addresses].Survey_Returned FROM [Vendor Addresses] WHERE [Vendor Addresses].Approved_Vendor = no AND [Vendor Addresses].Key_Supplier = yes ORDER BY [Vendor Addresses].Vendor_Name"
Set Con=Server.CreateObject("ADODB.Connection")
strConnect="DSN=Vendor"
Con.Open strConnect
set rstemp= Con.Execute(listSQL)
DO UNTIL rstemp.eof
IF rstemp.eof THEN response.write"<table width=755><tr><td><hr><center><b>There are no Vendors in this category at this time.</b></center><hr></td></tr></table>" ELSE response.write" "END IF
vNum = rstemp(0)
vName = rstemp(1)
vType = mid(rstemp(2), 1, 1)
vSurveyed = rstemp(3)
vSurvRet = rstemp(4)
IF vSurvRet = true THEN vSurvRet = "Y" ELSE vSurvRet = "N" END IF
Response.write"<tr><td><center>" & vNum & "</center></td><td>" & vName & "</td><td><center>" & vType & "</center></td><td><center>" & vSurveyed & "</center></td><td><center>" & vSurvRet & "</center></td></tr>"
rstemp.movenext
LOOP
rstemp.Close
set rstemp = Nothing
Con.Close
set Con = Nothing
Thanks,
Cheryl dc Kern
The set-up worked fine while I was creating and formatting the first page, which I was going ot use as a template for the other pages. As I worked on the page, I kept changing format details and then refreshing it in my browser, with no problems. I worked on this pretty much all day yesterday with no issues. Then at the end of the day, I took the page and created two more pages with slightly different queries based on its structure.
Now, no matter which of the three pages I use, it will work fine the first time that it is viewed, but if refreshed, it will throw an error that says:
Provider error '80004005'
Unspecified error
/AVLkey.asp, line 37
The line referred to is:
Con.Open strConnect
strConnect has been previously set with the DSN info, thus:
strConnect="DSN=Vendor"
If I wait a few minutes before refreshing, the page usually then works fine. I don't understand how this happens, since I spent basically a whole day off and on refreshing the page (with sometimes just a few seconds between the refreshes) and it never threw the error. I also used to work for a ompany that used an access database for their website until the database got too big, and we never had trouble with it at that point, either.
What can be causing this issue? How can I fix it? Below is the entire section of code from the start of the connection to the finish, in case it helps:
listSQL="SELECT [Vendor Addresses].Vendor_Num, [Vendor Addresses].Vendor_Name, [Vendor Addresses].Vendor_Type, [Vendor Addresses].Survey_Faxed, [Vendor Addresses].Survey_Returned FROM [Vendor Addresses] WHERE [Vendor Addresses].Approved_Vendor = no AND [Vendor Addresses].Key_Supplier = yes ORDER BY [Vendor Addresses].Vendor_Name"
Set Con=Server.CreateObject("ADODB.Connection")
strConnect="DSN=Vendor"
Con.Open strConnect
set rstemp= Con.Execute(listSQL)
DO UNTIL rstemp.eof
IF rstemp.eof THEN response.write"<table width=755><tr><td><hr><center><b>There are no Vendors in this category at this time.</b></center><hr></td></tr></table>" ELSE response.write" "END IF
vNum = rstemp(0)
vName = rstemp(1)
vType = mid(rstemp(2), 1, 1)
vSurveyed = rstemp(3)
vSurvRet = rstemp(4)
IF vSurvRet = true THEN vSurvRet = "Y" ELSE vSurvRet = "N" END IF
Response.write"<tr><td><center>" & vNum & "</center></td><td>" & vName & "</td><td><center>" & vType & "</center></td><td><center>" & vSurveyed & "</center></td><td><center>" & vSurvRet & "</center></td></tr>"
rstemp.movenext
LOOP
rstemp.Close
set rstemp = Nothing
Con.Close
set Con = Nothing
Thanks,
Cheryl dc Kern