Solved

Runtime error on ASP page

Posted on 1998-12-07
2
185 Views
Last Modified: 2010-03-19
Hello,

   I'm using MS Personal Web Server 4.0 to develop my site before I upload it.  It supports ASP but I get a few errors when trying to access an Access database.  Here is the code:

set conntemp=server.createobject("adodb.connection")
set rstemp=server.createobject("adodb.recordset")
conntemp.open "DSN=Products"
rstemp = conntemp.execute("select * from Products where Category='Accounting' AND [Sub Category]='Taxes'")
do while not rstemp.eof
      response.write("<tr><td width=232 valign=middle><p align=left><font size=2>")
      response.write("<a href='" + rstemp(8) + "'>")
      response.write("</td></tr>")

rstemp.movenext
loop

I get this error:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'rstemp.eof'

/software/accounting/account.asp, line 130

I also get this error when trying to use the rstemp.fields property.  Is this a problem with MSPWS 4.0 or my code?

Thanks!
0
Comment
Question by:ingenito
2 Comments
 
LVL 3

Accepted Solution

by:
hakyemez earned 200 total points
ID: 1092122
Change Code
===========
set conntemp=server.createobject("adodb.connection")
set rstemp=server.createobject("adodb.recordset")
conntemp.open "DSN=Products"
rstemp.Open "select * from Products where Category='Accounting' AND [Sub Category]='Taxes'",conntemp,adOpenStatic,adLockReadOnly
while not rstemp.eof
response.write("<tr><td width=232 valign=middle><p align=left><font size=2>")
response.write("<a href='" + rstemp(8) + "'>")
response.write("</td></tr>")
rstemp.movenext
wend
rstemp.Close
set rstemp=nothing
set conntemp=nothing
0
 

Author Comment

by:ingenito
ID: 1092123
Thanks!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL STANDARD CORE 7 31
SQL USE DATABASE VARIABLE 5 27
First Max value 3 28
Run Stored Procedure uisng ADO 5 20
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

856 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