> Unless you use stored procedures exclusively
-- In any cfquery, use SQL transaction statements.
-- Build long cfquery with multiple SQL statements (cfquery allows multiple
SQL statements)
-- In the application-data base design, minimize the transaction area. By
keeping the area small, rollback has less impact.
-- Do risk assessments on commit requirements and eliminate unnecessary
transaction locks.
-- Use dynamic SQL and stored procedures in cfquery
-- Use keys and triggers in the DB to maintain integrity
As far as I can understand from its behavior, cftransaction is a dynamic
SQL query shell. My mental model, is that it is a giant stack of dynamic
SQL statements. The first push on the stack is a SQL begin transaction
with the cftransaction tab. Next as the CF code runs, more SQL is pushed on
the stack. Then, the when /cftransaction happens the end transaction is
pushed on. And at last, the stack is run from the top.
Perhaps this model is wrong, I have not read any CF doc that really
describe how cftransaction works, to build a better model. Nevertheless,
based on this model, locking the DB while waiting for a bunch of dynamic
SQL could be more risky than not using cftransaction.
If you want to see how to use transactions in cfquery, in my CFSQLTool, all
the queries generated have SQL transaction statements.
Joseph
At 07:52 AM 6/13/2005, you wrote:
> ( I never use cftransaction because it has poor documentation.
> I know Cornfied and others brag about it, but I do not consider
> it a best practice tag. cfinsert and cfupdate fall into this
> category as well.)
Unless you use stored procedures exclusively, how else can you guarantee
that two queries are treated as a single transaction?
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
----------------------------------------------------------
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).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]
-----------------------------------------------------------------------
http://www.switch-box.org/CFSQLTool/Download/
Switch_box MediaFirm, Inc.
www.Switch-box.org Loveland, CO USA
----------------------------------------------------------
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).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]