Matt,

I definitely see your point on that. I certainly never got any usage out of cfinsert/cfupdate and I can see how this seems like merely an alternate syntax for those tags.

I think, however, that cfinsert and cfupdate are more limited in significant ways (which I cover in my presentation on switching to DataMgr from cfinsert and cfupdate).

Since cfinsert/cfupdate are tied to form fields, but have no knowledge of the database table, you must be careful to use only form fields that are in the table or tell the tags about your table structure. The tags provide don't provide any more information about errors than straight SQL. The tags do not lend themselves to use from within a CFC.

If you want to get back the primary key value when using the ColdFusion tags you have to go through extra steps outside of the tags.

In my personal experience, I have found that my component has the advantages of cfinsert/cfupdate without the drawbacks (granted it could be something odd about my experience - but others get good use out the component as well). Interestingly, I didn't set out to replace those tags - just to get rid of the need to hand-code the same checks for every insert/update to the database.

I also ended up with advantages that cfinsert/cfupdate never had. For example, my components now ensure that the database has the structure that they require to work (so that when I copy a component from development to production, I don't have to update the database structure as well).

Steve


At 02:23 PM 5/30/2006, Matt Williams wrote:
This almost seems like what cfinsert and cfupdate were supposed to do for us. It's a rare occasion that I've seen those tags used.



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to