sc_begin_trans("Connection")

This macro starts a set of transactions in the database.

For the use of this macro you need to have a transactional database.

In form applications, the events (onAfterInsert, onAfterUpdate, onAfterDelete, onBeforeInsert, onBeforeUpdate or onBeforeDelete) are automatically protected by a transaction control, since the connection is the same of the application.

In the other cases, if the user need to make a transaction control, must begin with this macro and finish with the sc_commit_trans() macro to confirm the updates or sc_rollback_trans() to cancel the transactions.

The "connection" parameter is optional, necessary only if the command is executed in a different connection from the actual application.