Solved

Runtime error on ASP page

Posted on 1998-12-07
2
182 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

815 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now