Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Newbie Question - No Record Return Page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Newbie Question - No Record Return Page

 Post Reply Post Reply
Author
jdumayas View Drop Down
Newbie
Newbie
Avatar

Joined: 19 February 2003
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote jdumayas Quote  Post ReplyReply Direct Link To This Post Topic: Newbie Question - No Record Return Page
    Posted: 26 February 2003 at 12:54pm

Hello,  Thanks to all of the help I've been getting in this forum, I've got a better grasp of my SQL queries.  But not I'm having a problem setting up the redirect or "no record found" message.  Here is my code:

If rseComm("offeringID") = False Then


Response.Write ("Sorry Your Query Had No Results")

Else

Response.Write ("<table width=100% border=1 cellspacing=1>")
Response.Write ("<tr><td background=menu-images/menuback.gif><font color=white size=2 face=Arial, Helvetica, sans-serif><strong>Title</a></strong></td><td background=menu-images/menuback.gif><font color=white size=2 face=Arial, Helvetica, sans-serif><strong>Date of Production</td><td background=menu-images/menuback.gif><font color=white size=2 face=Arial, Helvetica, sans-serif><strong>Format</td><td background=menu-images/menuback.gif><font color=white size=2 face=Arial, Helvetica, sans-serif><strong>Duration</td></b><td background=menu-images/menuback.gif><font color=white size=2 face=Arial, Helvetica, sans-serif><strong>Level</td></b></font></tr></font></tr>") 
Do While not rseComm.EOF
    
Response.Write ("<tr bgcolor=FFFFFF>")
Response.Write ("<td><font color=#000000 size=2 face=Arial, Helvetica, sans-serif><a href="&rseComm("offeringLocation")&" target="&rseComm("offeringID")&">"&rseComm("offeringTitle")&"</a></td>"&"<td><font color=#000000 size=2 face=Arial, Helvetica, sans-serif>"&rseComm("dateofProd")&"</td>"&"<td><font color=#000000 size=2 face=Arial, Helvetica, sans-serif>"&rseComm("format")&"</td>"&"<td><font color=#000000 size=2 face=Arial, Helvetica, sans-serif>"&rseComm("duration")&"</font></td>"&"<td><font color=#000000 size=2 face=Arial, Helvetica, sans-serif>"&rseComm("level")&"</font></td>")
Response.Write ("</tr>")
rseComm.MoveNext

Loop

End if

My DB works correctly when there is data to return.  But when there is no data to return I get an error page not liking the "IF" statment line.

I'm not sure if I need to set up another table or another variable.  Any assistance would be greatly appreciated.  Thanks for all of your help. - Jeremy

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2003 at 12:55pm
If rseComm.EOF Then
    Response.Write ("Sorry Your Query Had No Results")
Else
blah blah blah
end if

Contribute to the working anarchy we fondly call the Internet
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.