Variables-DatabaseDatabase Variables

Global variables containing database access values used by main connection.

Variables
Description
sc_glo_server Server name.
sc_glo_db Database name.
sc_glo_db_type Database type (mssql, oracle, mysql, etc).
sc_glo_user Connected user name.
sc_glo_pass Database password access.
sc_glo_cript_pass Encrypted password (S/N).
sc_glo_decimal_db Used decimal separator (point or comma).



Ex. 1:

$my_database = [sc_glo_db];



These variables only reference the values without updating it (it is not possible to attribute/modify the values). To define user and the password to connect to the database, use the following variables:

Variables
Description
sc_db_master_usr User login to be used.
sc_db_master_pass Password to be used.
sc_db_master_cript Encrypted password (S/N) (see sc_encode macro).

Important: These variables only take effect during next application execution remaining valid during all the session (unless modified).


Ex. 2:
An application type "control" with a form created with information "login" and encrypted "password". These data must be used to connect to the database, during the system applications execution.
$temp_pass = sc_encode({password});
[sc_db_master_usr] = {login};
[sc_db_master_pass] = $temp_pass;
[sc_db_master_cript] = "S";