I have an .asp page on our local intranet which is meant to query an Access database to pull the information to display. The database is located in a folder in the same directory as the .asp page.
Below is the code from the .asp page:
<% OPTION EXPLICIT %>
<%
dim strConnect, pageTitle, pageType, listSQL, vNum, vName, vType, vSurveyed, vSurvRet, Con, rstemp
listSQL="SELECT A.[Vendor #], A.[Vendor Name], A.[Vendor Type], A.[Survey Faxed], A.[Survey Returned] FROM [Vendor Addresses], A
WHERE A.[Approved Vendor] = 'yes' AND A.[Active?] = 'yes' ORDER BY A.[Vendor Name]"
%>
and later:
<%
Set Con=Server.CreateObject("ADODB.Connection")
strConnect="DSN=Vendor"
Con.Open strConnect
set rstemp= Con.Execute(listSQL)
DO UNTIL rstemp1.eof
vNum = rstemp(0)
vName = rstemp(1)
vType = rstemp(2)
vSurveyed = rstemp(3)
vSurvRet = rstemp(4)
Response.write""
rstemp.movenext
LOOP
rstemp.Close
set rstemp = Nothing
Con.Close
set Con = Nothing
%>
(NOTE: nothing is included in Response.write yet, because I'm just trying to see if I can get it to connect and pull the data without error.)
When I view the page, this is the error that it throws:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
/avl.asp, line 37
Line 37 is the line that says "set rstemp= Con.Execute(listSQL)"
There is no COUNT field or operation included in listSQL.
Can anyone help me figure out what this error is and how to fix it?
Cheryl dc Kern
Below is the code from the .asp page:
<% OPTION EXPLICIT %>
<%
dim strConnect, pageTitle, pageType, listSQL, vNum, vName, vType, vSurveyed, vSurvRet, Con, rstemp
listSQL="SELECT A.[Vendor #], A.[Vendor Name], A.[Vendor Type], A.[Survey Faxed], A.[Survey Returned] FROM [Vendor Addresses], A
WHERE A.[Approved Vendor] = 'yes' AND A.[Active?] = 'yes' ORDER BY A.[Vendor Name]"
%>
and later:
<%
Set Con=Server.CreateObject("ADODB.Connection")
strConnect="DSN=Vendor"
Con.Open strConnect
set rstemp= Con.Execute(listSQL)
DO UNTIL rstemp1.eof
vNum = rstemp(0)
vName = rstemp(1)
vType = rstemp(2)
vSurveyed = rstemp(3)
vSurvRet = rstemp(4)
Response.write""
rstemp.movenext
LOOP
rstemp.Close
set rstemp = Nothing
Con.Close
set Con = Nothing
%>
(NOTE: nothing is included in Response.write yet, because I'm just trying to see if I can get it to connect and pull the data without error.)
When I view the page, this is the error that it throws:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
/avl.asp, line 37
Line 37 is the line that says "set rstemp= Con.Execute(listSQL)"
There is no COUNT field or operation included in listSQL.
Can anyone help me figure out what this error is and how to fix it?
Cheryl dc Kern