sc_begin_trans("Connection")
|
|
This macro starts a set of transactions in the database.
In form applications, the events that can run this macro is dependent of the database update (onAfterInsert, onAfterUpdate, onAfterDelete, onBeforeInsert, onBeforeUpdate or onBeforeDelete), they are automatically protected through transaction control, since the connection is the same of the application.
In the other cases, if the user wish to make 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 database from the specified application.
|
Macro Scope
|
Blank application
|
calendar application
|
chart application
|
Grid application
|
Search application
|
Form application
|
Control Form
|
Menu application
|
Tree menu
|
ReportPDF application
|
allMacros onExecute
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros onAfterDelete onAfterInsert onAfterUpdate onBeforeDelete onBeforeInsert onBeforeUpdate onInit onLoadAll onRefresh onValidate onValidateFailure onValidateSuccess
|
allMacros onFooter onHeader onInit
|
ajaxFieldonClick allMacros onFooter onGroupBy onHeader onInit onNavigate onRecord
|
allMacros onFilterInit onFilterRefresh onFilterSave onFilterValidate
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros onAfterDelete onAfterDeleteAll onAfterInsert onAfterInsertAll onAfterUpdate onAfterUpdateAll onBeforeDelete onBeforeDeleteAll onBeforeInsert onBeforeInsertAll onBeforeUpdate onBeforeUpdateAll onClick onInit onLoadAll onNavigate onRecord onRefresh onValidate onValidateFailure onValidateSuccess
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros onClick onInit onLoadAll onRefresh onValidate onValidateFailure onValidateSuccess
|
allMacros onApplicationInit onExecute onLoad
|
allMacros onApplicationInit onExecute onLoad
|
allMacros onFooter onHeader onInit onRecord
|
|