Solved

rsObject.Eof not supported?

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

695 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