I never use cfupdate. I just use a cfquery like this: <cfquery name="update" datasource = "datasourcename"> update tablename set fieldname1 = <cfqueryparam value="#fieldvalue1#" cfsqltype="cf_sql_numeric">, fieldname2 = <cfqueryparam value="#fieldvalue2#" cfsqltype="cf_sql_numeric"> </cfquery>
While it looks more complex than CFUpdate, Using cfquery with the UPDATE query gives you absolute control on which field is being updated with which value without regard to the position of the fields in the data table. Using cfqueryparam avoids any potential of a SQL injection attack on your site. Make sure the cfsqltype matches the data type of the field you are updating. Hope this helps. On Fri, Apr 10, 2009 at 6:39 PM, John Barrett <[email protected]> wrote: > > Hi Maureen, > Thank you so much for your help, this was it! when I changed it to > have value instead of the id everything wotked:) > Now I have another problem. > > in the form I am using > <cfform action="update_action.cfm" method="Post"> > in the update_action.cfm file I am using cfupdate, but I get the error: > The UPDATE fieldname cannot be found in the Artists table. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4507 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
