setProfileStringAppServer
setProfileStringAppServer(fileName: String; section: String; keyName: String; string: String): Boolean;
The setProfileStringAppServer method of the Application class copies a string into the section of an initialization file specified in the section parameter on an application server workstation when the application is running in JADE thin client mode. This method returns true if it succeeds in storing the specified string.
If the application is not running in JADE thin client mode, this method functions like the Application class setProfileString method or
The parameters for the setProfileStringAppServer method are listed in the following table.
Parameter | Specifies the … |
---|---|
fileName | Initialization file. If you set this parameter to windows, the win.ini file on the client node is used. If this parameter does not contain a full path to the file, Windows searches for the file in the Windows directory on the client node. |
section | Initialization file section containing the key (parameter) name. |
keyName | Name of the key (parameter) whose associated string is to be stored. |
string | String that is to be written to the file. |
You can use this method to copy a string to a two-level section name (prefixed with a unique identifier) within a JADE initialization file shared by multiple programs on the same application server host. For details, see "
To remove a key parameter (keyName) from an initialization file, set the string parameter to ProfileRemoveKey (a global constant in the
The following example shows the use of the setProfileStringAppServer method.
begin // JADE system adds a value of name= (for example, "InternalAS.") app.setProfileStringAppServer(app.getIniFileName, "JadeAppServer", "PictureCacheFile", ProfileRemoveKey); // Initialization file name not IDENTICAL, so we can supply a prefix // If the user has moved the window, reset it to the default values app.setProfileStringAppServer("\jade\system\JADE.ini", "Test.JadeAppServer", "WindowPos", ProfileRemoveKey); // JADE uses the single-level (top level) section name app.setProfileStringAppServer("c:\jade\system\jade.ini", ".JadeAppServer", "EnableAppRestrictions", "true"); end;