Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if not recordset.BOF problem

Status
Not open for further replies.

leujel

Programmer
May 28, 2003
23
NL
I've made a page that checks if a recordset is empty or not. If it's empty it parses a sentence, if it's not empty it loops thru the recordset and parses it all... But When I do this, I get an error. That the object (my recordset) doesn't support eof or bof.

This is my code:

Code:
<!--#include file=&quot;../include/connectioninc.asp&quot;-->
<%
            SQL = &quot;SELECT * FROM tbl_content WHERE contentID = &quot; & request.querystring(&quot;id&quot;) & &quot;&quot;
            RShome = conn.execute(SQL)
%>

<html>
<head>
<title>::: Leujel :::</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<link href=&quot;../_css/3.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>
</head>

<body>
<%
      If Not RShome.eof Then

            Do While Not RShome.EOF

                  response.write(&quot;<table width=&quot;&quot;100%&quot;&quot; cellpadding=&quot;&quot;0&quot;&quot; cellspacing=&quot;&quot;0&quot;&quot;>&quot;)
                  response.write(&quot;<tr>&quot;)
                  response.write(&quot;<td><b>&quot; & RShome(&quot;contentkop&quot;) & &quot;</b></td>&quot;)
                  response.write(&quot;</tr>&quot;)
                  response.write(&quot;<tr>&quot;)
                  response.write(&quot;<td height=&quot;&quot;15&quot;&quot;></td>&quot;)
                  response.write(&quot;</tr>&quot;)
                  response.write(&quot;<tr>&quot;)
                  response.write(&quot;<td>&quot; & RShome(&quot;content&quot;) & &quot;</td>&quot;)
                  response.write(&quot;</tr>&quot;)
                  response.write(&quot;</table>&quot;)

            RShome.MoveNext
            Loop

      Else
            response.write(&quot;<tr>&quot;)
            response.write(&quot;<td>Sorry er zijn geen entries gevonden.</td>&quot;)
            response.write(&quot;</tr>&quot;)

      END IF
%>

</body>
</html>

<!--#include file=&quot;../include/conncloseinc.asp&quot;-->

Visit
 
Try

If RShome.eof = False then

www.vzio.com
ASP WEB DEVELOPMENT



 
Well.. I tried, but it didn't work either... I've tried a lot of things and ist's getting pretty anoying...

The problem is that I can't post the error that it gives me because it's in Dutch... And a small chance that you can understand it....

Visit
 
I've already found my fault.... My SQL was:

SQL = &quot;SELECT bla bla&quot;
RShome = conn.execute(SQL)

But it had to be:

SQL = &quot;SELECT bla bla&quot;
Set RShome = conn.execute(SQL)

Visit
 
haha thats the first thing i was going to check but isnt wasnt included in your code! good catch on your part.

www.vzio.com
ASP WEB DEVELOPMENT



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top