If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Image is null

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-11-09, 15:23
bingo_barns bingo_barns is offline
Registered User
 
Join Date: Sep 2009
Posts: 21
Image is null

If I grab the location of an image through a database and the return value is null I want to have it so no image comes up. What is the best way to do that.

<%if <"image"> = null then
<"image"> = "".
%>

how can I cancel out that image? In a nice way.
Reply With Quote
  #2 (permalink)  
Old 09-12-09, 01:33
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,071
nothing can ever equal null.

Did you go through that tutorial I suggested yet?
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #3 (permalink)  
Old 09-12-09, 15:24
bingo_barns bingo_barns is offline
Registered User
 
Join Date: Sep 2009
Posts: 21
I didn't see anything there about null values. Send me the page if I'm wrong.

Last edited by bingo_barns; 09-12-09 at 16:13.
Reply With Quote
  #4 (permalink)  
Old 09-14-09, 07:22
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
You want this function: VBScript IsNull Function
__________________
George
Twitter | Blog
Reply With Quote
  #5 (permalink)  
Old 09-14-09, 07:45
bingo_barns bingo_barns is offline
Registered User
 
Join Date: Sep 2009
Posts: 21
Thanks alot man.
Reply With Quote
  #6 (permalink)  
Old 09-14-09, 09:43
bingo_barns bingo_barns is offline
Registered User
 
Join Date: Sep 2009
Posts: 21
hmm I'm still having trouble getting this to work.

<% If (IsNull("sVendorImg"))then %>

'do nothing

<% else %>

<img src = "<%=qtest2("sVendorImg")%>" class="floatleft">

<% end if %>

I'm grabbing an image from a data base <img src = "<%=qtest2("sVendorImg")%>" And I need to have it so if there is nothing in the field sVendorImg it will jump past it.

Last edited by bingo_barns; 09-14-09 at 10:01.
Reply With Quote
  #7 (permalink)  
Old 09-14-09, 10:25
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Look at what you're passing to the IsNull() function - a string literal!
__________________
George
Twitter | Blog
Reply With Quote
  #8 (permalink)  
Old 09-14-09, 10:35
bingo_barns bingo_barns is offline
Registered User
 
Join Date: Sep 2009
Posts: 21
haha jesus!
Reply With Quote
  #9 (permalink)  
Old 09-14-09, 11:18
bingo_barns bingo_barns is offline
Registered User
 
Join Date: Sep 2009
Posts: 21
Thanks got it to work perfectly.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On