Displaying InterBase Configuration Parameters
Go Up to Displaying Server Properties
Use the ConfigParams
option along with the FetchConfigParams
or Fetch
method to display the parameters and values in the ibconfig
file on the server. ConfigParams
displays the location of the InterBase executable, the lock file, the message file, and the security database. It also displays the configuration file parameters. You can set ConfigParams
to <True> in the Object Inspector, or you can set it in code.
The following code snippet shows how you could display configuration parameters as label captions.
Options := [ConfigParameters]; FetchConfigParams; Label1.Caption := 'Base File = ' + ConfigParams.BaseLocation; Label2.Caption := 'Lock File = ' + ConfigParams.LockFileLocation; Label3.Caption := 'Message File = ' + ConfigParams.MessageFileLocation; Label4.Caption := 'Security Database = ' + ConfigParams.SecurityDatabaseLocation;
You could also set the ConfigFileData
array to display server key values in a Memo
component.
var I: Integer; st1: string; . . . for I:= 0 to High(ConfigParams.ConfigFileData.ConfigFileValue) do begin case ConfigParams.ConfigFileData.ConfigFileKey[i] of ISCCFG_IPCMAP_KEY: st1 := 'IPCMAP_KEY'; ISCCFG_LOCKMEM_KEY: st1 := 'LOCKMEM_KEY'; . . . ISCCFG_DUMMY_INTRVL_KEY: st1 := 'DUMMY_INTRVL_KEY'; end; Memo1.Lines.Add(st1 + ' = ' + IntTostr(ConfigParams.ConfigFileData.ConfigFileValue[i]));