This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > June 2004 > BOF, EOF question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| osoleon62 2004-06-02, 11:16 pm |
| I'm displaying search results from a DB on the same page, as the search form.
I would like to include a 'No results found' if the user doesn't find what
they are looking for.
If I use the default MM show region if rs empty, my no results message
displays when you load the page.
How do I conceal it until they don't find anthing.
I tried setting a varaible, but I'm not getting it yet.
Using VBScript in ASP.
| |
| ImageGroup 2004-06-02, 11:16 pm |
| This should do the trick. (Obviously change RS to whatever your recordset is
called)
<%
If RS.EOF OR RS.BOF Then
%>
There Are No Records! :-(
<%
ElseIf NOT RS.EOF Then
RS.movefirst
While Not RS.EOF
%>
There Are Records! (Put some code here to write the records found.)
<%
RS.movenext
Wend
End If
%>
| |
| osoleon62 2004-06-02, 11:16 pm |
| Thnax, but that is pretty much the same as the default, show if region empty.
What I need is more like
If Rs="" then (or maybe If Rs <> "" then)
no records
Else
so on
End if
But this doesn't work.
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|