sc_commit_trans("Connection")
|
|
This macro is used to confirm a transaction set in the database.
In form applications, there are events that perform transactions with the database (Ex: onAfterInsert, onAfterUpdate, onAfterDelete, onBeforeInsert, onBeforeUpdate, onBeforeDelete, etc...). The transaction control of these events is done by Scriptcase itself if the connection provided is the same as the application. However, if the user has to perform any type of redirection in these events, it is necessary to use the macro sc_commit_trans before the redirect to secure the transactions previously performed.
Ex: onAfterUpdate - Using redirection after update a record:
sc_commit_trans();
sc_redir('grid_main');
The "connection" parameter is optional, being necessary only if the command is executed in a different database specified to the application.
|
Macro Scope
|
Blank application
|
calendar application
|
chart application
|
Grid application
|
Dashboard
|
Search application
|
Form application
|
Control Form
|
Menu application
|
Responsive Menu
|
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
|
onInit onWidgetLoad
|
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
|
onApplicationInit onExecute onLoad
|
allMacros onApplicationInit onExecute onLoad
|
allMacros onFooter onHeader onInit onRecord
|
|