I'm guessing in your output loop, you are trying to revalue institution with a new value i.e. <cfset queryname.institution = newString(value)>?
___________________________________________________________________________________________ Troy Jones | Developer/Support Technician | Dynapp Inc | 1-800-830-5192 ext. 603 | dynapp.com | facebook.com/dynapp -----Original Message----- From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Forrest C Gilmore Sent: Tuesday, July 05, 2011 12:42 AM To: ACFUG Discussion Subject: [ACFUG Discuss] Update Query Problem I have a problem which seems like it should have a simple answer, but I cannot seem to find it! I have a Coldfusion datasource using a MS Access table with a field named Institution that can have multiple values. I need to replace some of the values in this field with new values. For example, everywhere the Value A occurs, I want to replace it with ABC, so that if Institution = 'A', it will become 'ABC', and if Institute= 'A, G' it will become 'ABC, G'. I am able to use the ColdFusion Replace function to create a new string containing the proper replacement value, but I cannot seem to replace the records from the database with this new string. I've tried CFUpdate as well as the SQL Update, but neither seems to work. Using CFQuery, I pull the ID and Institution values from the records I want to update from the database. Inside a CFOutput loop based on the query, I then use Replace to compute the NewString that will replace the old value of Institution. But CFSet will not cause Institution to take on this new value, so CFUpdate does not work, and if I try to use the standatd SQL Update statement inside a CFQuery, it throws a syntax error. What am I missing here? Forrest C. Gilmore ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------