transactionRollback

Rollback current transaction

transactionRollback([savepoint]) → returns void

Argument Reference

savepoint string

Name of the savepoint to roll back to

Examples
Sample code invoking the transactionRollback function

In this code, any error triggered will cause transactionRollback() to run and roll back the pending transaction


transaction { 
 try { 
 // code to run 
 transactionCommit(); 
 } 
 catch(any e) { 
  transactionRollback(); 
  } 
 }

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub