Jeff,

You need some way of checking to see if the file exists, such as this:

<!--- First check to see if the file is in the appropriate folder --->

<cfif fileExists(#file.serverdirectory#\#file.serverfile#)>
     <img src="newsimages\#photo#">
<CFELSE> 
<!--- set a default image>
     <img src="newsimages\default.gif"> 
</CFIF>

HTH,

larry

-- 
Larry C. Lyons
EBStor.com
8870 Rixlew Lane, Suite 201
Manassas, Virginia 20109-3795
tel: (703) 393-7930 x253
fax: (703) 393-2659
http://www.ebstor.com
http://www.pacel.com
email: [EMAIL PROTECTED]
Chaos, panic, and disorder - my work here is done.
--

Jeff Fongemie wrote:
> 
> I figured out how to get cffile to update a record and set to add the image
> file location.
> 
> If i use Set photo='#file.serverdirectory#\#file.serverfile#' the
> photolocation is too "absolute" (c:\inetpub\root\mydir\imagedir)
> 
> If I use Set photo='#file.serverfile#' I can use <img
> src="newsimages\#photo#"> in my query and it works fine, however if the
> record does not have an associated photo I get <img src="newsimages\"> and a
> missing photo on my page.
> 
> Is there a better way to store the image file locations, and/or is there a
> betterway to call the image in the query so I do not get the missing photo
> for records w/o an image location?
> 
> Thanks,
> 
> Jeff

-- 
Larry C. Lyons
EBStor.com
8870 Rixlew Lane, Suite 201
Manassas, Virginia 20109-3795
tel: (703) 393-7930 x253
fax: (703) 393-2659
http://www.ebstor.com
http://www.pacel.com
email: [EMAIL PROTECTED]

Chaos, panic, and disorder - my work here is done.
--
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to