DB Transactions With ColdFusionBy davidjmedlock
…posted by davidjmedlock:
Time flies all too quickly. I’ve been remiss in my posting here and I apologize. I did plan to write a quick note about the security of scheduled tasks, but I have yet to figure out a solid way of authenticating who ever is accessing them. At any rate, I did find this excellent article on Macromedia regarding database transactions.
For anyone who has ever developed serious applications, you may have encountered times when you performed many database alterations all in a row only to have one of them fail and ultimately ruin your afternoon (or weekend, even…) I strongly encourage the use of transactions as a means of error handling in your application. And in ColdFusion, they’re extremely easy to use.
With a framework such as .Net, you have to create a transaction object and attach it to a connection object and then begin the transaction and then when you’re finished with your queries, you have to commit the transaction. If you fail to do everything in just the right manner, you’re application will explode. With ColdFusion it’s really quite simple:
If any query inside the
So, there’s a little something more for your error handling and overall application stability toolbox. Enjoy.
SitePoint WordPress Restaurant Theme
SitePoint WordPress Ecommerce Theme
SitePoint WordPress Portfolio Theme
Elm: A Beginners' Guide to Elm and Data
Wrapping Your Head Around Python
Jump Start Git
Level Up Your Web Apps With Go
Jump Start MySQL
Jump Start Git
- 1 How to Migrate Your WordPress Site to A New Hosting Provider
- 2 Picking the Brains of Your Customers with Microsoft's Text Analytics
- 3 Shopify App Development Made Simple with HTTP APIs and Guzzle
- 4 How to Create a Pokemon Spawn Locations Recorder with CouchDB
- 5 Data Serialization Comparison: JSON, YAML, BSON, MessagePack