Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Problem with den Value of a Recordset
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

energy
Starting Member

29 Posts

Posted - 09 May 2002 :  15:33:59  Show Profile
I have a problem, when all fields are emty (FlyerURL, FotoURL) there isn't the Message for no Picture, there is always the URL from the FlyerURL Field (which is emty)

quote:

<% if len(rs.fields("FlyerURL")) < 5 then
if len(rs.fields("FotoURL")) < 5 then
Response.write("Kein Flyer/Foto<br>vorhanden!")
else
Response.write("<img src='" & rs("FotoURL") & "' width='100' border='0'>")
end if
else
Response.write("<img src='" & rs("FlyerURL") & "' width='100' border='0'>")
end if %>



i hope someone can help me
thnx
energy

Bullschmidt
New Member

USA
56 Posts

Posted - 09 May 2002 :  23:57:20  Show Profile  Visit Bullschmidt's Homepage
Perhaps change this:
if len(rs.fields("FlyerURL")) < 5 then
if len(rs.fields("FotoURL")) < 5 then

To be more like this instead:
if (len(rs.fields("FlyerURL")) < 5) or IsNull(rs.fields("FlyerURL")) then
if (len(rs.fields("FotoURL")) < 5) or IsNull(rs.fields("FotoURL")) then



J. Paul Schmidt - ASP Web Developer
www.Bullschmidt.com - To put live data on the Web...
Go to Top of Page

energy
Starting Member

29 Posts

Posted - 10 May 2002 :  06:56:18  Show Profile
heeee, it works. I tried this before and it doesn't works but i think the IsNull was a quit good idea.

Thank you!

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07