Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

if search result is nothing, how can I say...

Posted 27 Jan 2004 16:22:24
1
has voted
27 Jan 2004 16:22:24 Aron K posted:
Here's an easy one...

If the search result (record set)is nothing how can I say something like:

<pre id=code><font face=courier size=2 id=code>
Response.Write("&lt;p&gt;Sorry, your search did not return any results. Please try another term.&nbsp;&lt;/p&gt;"
</font id=code></pre id=code>

I tried
<pre id=code><font face=courier size=2 id=code> if (((search_numRows))=0) </font id=code></pre id=code>

But that didn't work. What variblae should I use?

Thanks!



-- Aron Kansal
1.401.368.3800 (Voice)
1.801.217.1704 (fax)

Replies

Replied 27 Jan 2004 19:20:35
27 Jan 2004 19:20:35 Dan Berdusco replied:
Just use:

<pre id=code><font face=courier size=2 id=code> &lt;% If Recordset.EOF And Recordset.BOF Then %&gt;
&lt;p&gt;Sorry, your search did not return any results. Please try another term. &lt;/p&gt;
&lt;% End If %&gt;
</font id=code></pre id=code>



Edited by - flexman44 on 27 Jan 2004 19:21:07
Replied 24 Feb 2004 18:18:43
24 Feb 2004 18:18:43 Efrain Martinez replied:
I you have DMX just use the show hidden area and select the recordset that the area is related to ...

Reply to this topic