> -- 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.
I believe that your mental model is incorrect. Based on my observation, nothing appears to be sent to the database until the entire statement has been prepared. This would conform with the way CF works in other respects, such as how custom tags generate output. 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]
