Solved

Runtime error on ASP page

Posted on 1998-12-07
2
177 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
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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 the fundamental information of how to create a table.

772 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

10 Experts available now in Live!

Get 1:1 Help Now