ParamValue(ParamName: String): Variant;
ParamName. Name of security module parameter.
The ParamValue property determines a value of the parameter of the security module.
To get name of security module parameter, use the ISecurityPackageLogonData.ParamName property.
As a value of the security module parameter, one can use substitutions with the use of global variables in the following format: "%<global variable identifier>%".
Executing the example requires that the repository contains a database with the OBJ_DB identifier.
Add links to the Db and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MBObj: IMetabaseObject;
DB: IDatabase;
LogonData: ISecurityPackageLogonData;
Begin
MB := MetabaseClass.Active;
// Get database
MBObj := MB.IteMById("OBJ_DB").Edit;
DB := MBObj As IDatabase;
// Change database connection settings
DB.UseMetabaseLogonData := False;
DB.Authentication := AuthenticationMode.Password;
DB.DriverId := "POSTGRES";
LogonData := DB.LogonData;
LogonData.ParamValue("SERVER") := "Test";
LogonData.ParamValue("SCHEME") := "%METABASE_DATABASE%";
LogonData.ParamValue("CASESENSITIVE") := "True";
// Save changes
MBObj.Save;
End Sub UserProc;
After executing the example, connection settings will be changed for the database with the OBJ_DB identifier.
See also: