<cfdump var="#form#" label="form">
<cfdump var="#attributes#" label="attributes">

<cfparam name="attributes.Color1" type="string" default="FFFFFF">
<cfparam name="attributes.Color2" type="string" default="000000">
<cfparam name="attributes.Color3" type="string" default="737567">
<cfparam name="attributes.Color4" type="string" default="FFFFFF">
<cfparam name="attributes.Color5" type="string" default="0000CC">
<cfparam name="attributes.Color6" type="string" default="330099">
<cfparam name="attributes.Color7" type="string" default="0000CC">
<cfparam name="attributes.Color8" type="string" default="4D4E45">
<cfparam name="attributes.Color9" type="string" default="FFFFFF">

<cfquery name="ChangeUserColors_Update" datasource="#request.dsn#">
        UPDATE  tblPeople
        SET     Color1 = <cfqueryparam value="#attributes.Color1#" 
cfsqltype="cf_sql_varchar">,
                Color2 = <cfqueryparam value="#attributes.Color2#" 
cfsqltype="cf_sql_varchar">,
                Color3 = <cfqueryparam value="#attributes.Color3#" 
cfsqltype="cf_sql_varchar">,
                Color4 = <cfqueryparam value="#attributes.Color4#" 
cfsqltype="cf_sql_varchar">,
                Color5 = <cfqueryparam value="#attributes.Color5#" 
cfsqltype="cf_sql_varchar">,
                Color6 = <cfqueryparam value="#attributes.Color6#" 
cfsqltype="cf_sql_varchar">,
                Color7 = <cfqueryparam value="#attributes.Color7#" 
cfsqltype="cf_sql_varchar">,
                Color8 = <cfqueryparam value="#attributes.Color8#" 
cfsqltype="cf_sql_varchar">,
                Color9 = <cfqueryparam value="#attributes.Color9#" 
cfsqltype="cf_sql_varchar">
        WHERE   PersonID = <cfqueryparam value="#request.sess.PersonID#" 
cfsqltype="cf_sql_integer">
</cfquery>

<cfabort>

But when the dump at the start of this is performed, then form is equal to:

form - struct 
COLOR1 B0C4DE 
COLOR2 000000 
COLOR3 4682B4 
COLOR4 FFFFFF 
COLOR5 330099 
COLOR6 FFA500 
COLOR7 FFD700 
COLOR8 00008B 
COLOR9 FFFFFF 
FIELDNAMES 
COLOR1,COLOR2,COLOR3,COLOR4,COLOR8,COLOR9,COLOR5,COLOR6,COLOR7,WHATTODO 
WHATTODO Save Values 

and attributes is:

attributes - struct 
ACTION FellowsF.ChangeUserColors 
COLOR1 FFFFFF 
COLOR2 000000 
COLOR3 4682B4 
COLOR4 FFFFFF
COLOR5 330099
COLOR6 FFA500 
COLOR7 FFD700 
COLOR8 00008B 
COLOR9 FFFFFF 
FIELDNAMES 
COLOR1,COLOR2,COLOR3,COLOR4,COLOR8,COLOR9,COLOR5,COLOR6,COLOR7,WHATTODO 
FUSEACTION FellowsF.ChangeUserColors 
THISPERSONID 681 
WEBMASTERS [EMAIL PROTECTED] 
WHATTODO Save Values 
fusebox.password [empty string] 

As you can see, the values of the variables in scope form are *not* being 
copied to attributes.  So the code winds up updating the table tblPeople with 
the values in attributes instead of the values the user enters on the form.

Does anyone know why?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212183
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to