Ali,

If the query expects a certain parameter, you can not ignore it. I 
assume the complete query looks like this:
<cfquery ...>
    Update something SET
    columnA = valueA,
    column =
    <cfif IsDefined("FORM.DogBreedImageL3") AND #FORM.DogBreedImageL3# 
NEQ "">
        <cfqueryparam value="#FORM.DogBreedImageL3#" 
cfsqltype="cf_sql_clob">
    <cfelse>
        ''
    </cfif>
</cfquery>

Instead, you should write something like this:

<cfquery ...>
    Update something SET
    columnA = valueA
    <cfif structKeyExists(FORM, "DogBreedImageL3") AND 
FORM.DogBreedImageL3 NEQ "">
        , column = <cfqueryparam value="#FORM.DogBreedImageL3#" 
cfsqltype="cf_sql_clob">
    </cfif>
</cfquery>

This should help...

Gert

Railo Technologies GmbH
[EMAIL PROTECTED]
www.railo.ch

Join our Mailing List / Treten Sie unserer Mailingliste bei:
deutsch: http://de.groups.yahoo.com/group/railo/
english: http://groups.yahoo.com/group/railo_talk/



Ali schrieb:
> Hi:
> I am working on a cfif and I wonder if there is a way to tell CF that leaves
> the query alone after CFELSE.
> This is what I mean
>  <cfif IsDefined("FORM.DogBreedImageL3") AND #FORM.DogBreedImageL3# NEQ "">
>     <cfqueryparam value="#FORM.DogBreedImageL3#" cfsqltype="cf_sql_clob">
>     <cfelse>
> ''
>   </cfif>
>
> I want to say CF that if the cfelse is true then it doesn't change any thing
> but when I leave it empty it returns an error and the only thing I can put
> there is ''.
> Please help!
> Benign
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298978
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to