sc_connection_edit("Connetion_Name", $arr_conn)
|
|
The edited connection will only be available in the next application.
This macro edits an existing connection at runtime. ("Connection_Name", $arr_conn)
1st Parameter: Name of the connection to be edited.
2nd Parameter: Array containing the connection information to be edited. See each index below:
Index
|
Description |
Example |
| ['server'] |
Database server |
$arr_conn['server'] = "127.0.0.1" |
| ['user'] |
Database user |
$arr_conn['user'] = "root" |
| ['password'] |
Database password |
$arr_conn['password'] = "secretpass123" |
| ['database'] |
Database used by the connection |
$arr_conn['database'] = "sc_samples" |
| ['persistent'] |
Defines whether the connection is persistent |
$arr_conn['persistent'] = "Y" / "N" |
| ['encoding'] |
Sets the connection encoding |
$arr_conn['encoding'] = "utf8" |
Note: It is not mandatory to edit all the array indices; you can pass only the index you want to change.
Example of macro usage:
$arr_conn = array();
$arr_conn['user'] = "admin2"; $arr_conn['password'] = "admin2pass"; $arr_conn['database'] = "sc_samples2";
sc_connection_edit("sc_conexao", $arr_conn);
|
Macro Scope
|
Blank application
|
calendar application
|
chart application
|
Grid application
|
Search application
|
Form application
|
Control Form
|
Menu application
|
Responsive Menu
|
Tree menu
|
ReportPDF application
|
allMacros onExecute
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros onAfterDelete onAfterInsert onAfterUpdate onApplicationInit onBeforeDelete onBeforeInsert onBeforeUpdate onCalendarApplicationInit onCalendarScriptInit onInit onLoadAll onValidateSuccess
|
allMacros onApplicationInit onFooter onHeader onInit
|
allMacros onInit
|
allMacros onApplicationInit onFilterInit onFilterRefresh onFilterSave onFilterValidate
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros onAfterDelete onAfterDeleteAll onAfterInsert onAfterInsertAll onAfterUpdate onAfterUpdateAll onApplicationInit onBeforeDelete onBeforeDeleteAll onBeforeInsert onBeforeInsertAll onBeforeUpdate onBeforeUpdateAll onClick onInit onLoadAll onNavigate onRecord onValidateSuccess
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros onApplicationInit onClick onInit onLoadAll onRefresh onValidate onValidateFailure onValidateSuccess
|
allMacros onApplicationInit onExecute onLoad
|
onApplicationInit onExecute onLoad
|
allMacros onExecute onLoad
|
allMacros onApplicationInit onFooter onHeader onInit onRecord
|
|