?
Solved

rsObject.Eof not supported?

Posted on 2001-06-21
4
Medium Priority
?
270 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 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

770 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