Newbie - Page stop loading after EOF

T

TNG

Hi,

Probably simple question, but I searched and searched for a solution, but
still no result:
so... I have a simple ASP file with two recordsets, and lot of text. In the
beginning I check
my database if there are records present.

But if no records are present, what should I put in the code to prevent that
everything else of my page does'nt load en that in the table where there are
no records are, just a message appears ??

if (objRSNews.BOF and objRSNews.EOF) then
'
'
' ******************** oplossing zoeken voor al er geen nieuwsfeiten zijn.
'
response.end
End if



Thx
 
R

Ray Costanzo [MVP]

Try

If Not objRSNew.EOF Then
''your code
Else
Response.Write "No records"
End If
objRSNew.Close : Set objRSNew = Nothing
yourADOConnection.Close : Set yourADOConnection = Nothing

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,158
Messages
2,570,882
Members
47,414
Latest member
djangoframe

Latest Threads

Top