Solved

rsObject.Eof not supported?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
EOF BOF error classic asp 8 51
Query to get the soonest date out of a few records 2 51
Want the count number from this QUery 2 53
ASP CDO - Limiting Connections 3 59
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…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

765 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