Solved

rsObject.Eof not supported?

Posted on 2001-06-21
4
257 Views
Last Modified: 2012-06-21
When trying to execute this simple asp pagE:

<%@ Language=VBScript %>
<!--#include file="common.asp"-->
<%
sqlEvent = "SELECT * FROM EVENT where EVENT.id = 1 AND EVENT.position <= 7"

rsEvent = conn.execute(sqlEvent)
if not rsEvent.Eof then
Response.Write("<tr>")
Response.Write("<td>Rider</td>")
Response.Write("<td>Pos</td>")
response.Write("<tr>")
         
do while not rsEvent.EOF
Response.write ("<td class=content>" & rsEvent("id") & ">&nbsp;&nbsp;</td>")
Response.write ("<td class=content>" & rsEvent("position") & ">&nbsp;&nbsp;</td>")
                             
Response.Write("</tr>")
RSevent.MoveNext          
loop          
end if    
%>

i get this error:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'rsEvent.Eof'

how is this possible? It works fine when i use it in other similar pages.
0
Comment
Question by:mikeandbee
4 Comments
 
LVL 20

Expert Comment

by:jitganguly
ID: 6215544
do this

Set rsEvent = conn.execute(sqlEvent)
0
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6215731
TRY EOF while Eof

Harry
0
 
LVL 7

Expert Comment

by:John844
ID: 6216039
what is the contents of common.asp?

does it have the code for creating your recordset and connection objects?

set conn = server.createobject("ADODB.Connection")
set rsEvent = server.createobject("ADODB.Recordset")

'open the connection
then
set rsEvent = con.execute(sqlEvent)
0
 
LVL 14

Accepted Solution

by:
puranik_p earned 50 total points
ID: 6216989
mike,
recordset is an object and not a string or integer kind of data type .
So when you are assigningit a value , you must use the "Set" keyword.Like..
Set RsEvent = conn.Execute(SqlEvent)
Do this and your problem is solved.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

11 Experts available now in Live!

Get 1:1 Help Now