Generally, CFUPDATE is used when you have a small table to update with very
little data, and the form fields are named the same as the DB fields.
CFQUERY takes the form fields and uses them to update the table. If you are
not updating all of the fields in the database, then you have to add an
extra attribute to it called FormFields. Also, your form fields need to be
named the same as the fields in the table. Long explanation short, it is
very inflexible.
CFUPDATE is also generally slower as it has to dynamically build the query
each time it is run.
Using CFQUERY with a SQL statement is faster as the query is already built.
Also, your form field names can be different than your database table field
names. It is way more flexible and is a better solution.
Of course, the best solution is to use Stored Procedures. Why not let the DB
server do what it was intended to do in the first place.
Bruce
----- Original Message -----
From: "Koo Pai Lao" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 12, 2001 5:24 PM
Subject: CFUPDATE vs. UPDATE
> which is faster or why should i use one over the other?
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists