Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Runtime error on ASP page

Posted on 1998-12-07
2
Medium Priority
?
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
hakyemez earned 800 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

598 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