This also came to mind.  Create a variable, in your object, that stores
a list of fields that were updated, or updateable.

On the larger form, you would specify all fields, or none to default to
all fields.  On the smaller form, you specify only the fields that
should be updated.

Then, in you DAO, you loop over the list (or do some CFIFs) that
determine which fields you add to your SQL UPDATE statement.

I think this is a bit of a kludge, but it's workable.

M!ke 

-----Original Message-----
From: Matt Williams [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 30, 2006 2:22 PM
To: CF-Talk
Subject: Re: OOP/CF - Update Function in a DAO

Mike, I thought of that too. It would probably work. The issue I have
with it is if a field were to get added at some point, I'd have to make
sure every possible form got that field added.

Keep thinking. I know there has to be an easier way. I fear it involves
mucho 'if' statements.

Matt

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236604
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