Some of the answer depends on your overall architecture. The first step
would be to retrieve the relevant database record using the ID passed from
your form. That would give you, in some manner (a query record, a bean,
whatever) a representation of the existing data.

Then you could write a routine that compares the values of the retrieved
record/bean with those submitted in the form.

You might also think of this as two different tasks: 1) updating the record,
and 2) recording (elsewhere) the changes.

The second task is the audit, of course. That's why you're doing the
comparison. As for the first, there's no particular reason to worry about
which fields have been changed when you're updating the record. Just use all
the form fields and do an update. By definition, the changes will be
recorded and the data that has not changed will remain the same. That avoids
the necessity of writing a complex dynamic update statement, which could be
a big benefit with as many fields as you seem to have.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331562
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to