Set savepoint for transaction
transactionSetSavepoint(savepoint)
→ returns void
This example runs multiple queries with a savepoint for each, and rolls back to the 'useradded' savepoint if the last query fails.
transaction {
// insert user
transactionSetSavepoint('useradded');
try {
// another query
}
catch(any e) {
transactionRollback();
}
}
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.