Solved

Runtime error on ASP page

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.

895 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

20 Experts available now in Live!

Get 1:1 Help Now