Solved

rsObject.Eof not supported?

Posted on 2001-06-21
4
262 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
can I post data from an asp page to php page? 4 51
FileUp - Classic ASP 5 17
Time Conversions...both ways 2 14
ASP server side get value 15 19
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

785 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