ISysSettings.Root

Syntax

Root: ISysSettingsKey;

Description

The Root property returns parameters of the Root element from the settings file.

Example

Executing the example requires the settings.xml file. This file contains all sections with BI server settings filled.

Add a link to the Xml system assembly.

Sub UserProc;
Var
    Settings: ISysSettings;
    Node: ISysSettingsKey;
    XmlNode: IXmlDomElement;
    Lock: Object;
Begin
    Settings := New SysSettings.Create;
    Debug.WriteLine("File location: " + Settings.Location);
    //The Root element
    Node := Settings.Root;
    XmlNode := Node.Element As IXmlDomElement;
    //Get parameters of the <Root> element/<Key Name="PP">/<BIS>/<Key Name="System">/<Pool>
    XmlNode := XmlNode.selectSingleNode("//Pool"As IXmlDomElement;
    //Change value of the MaxConnections attribute
    XmlNode.setAttribute("MaxConnections""100");
    //Lock before saving
    Lock := Settings.CriticalLock;
    Try
        Settings.Commit;
    Finally
        Dispose Lock;
    End Try;
End Sub UserProc;

After executing the example value of the MaxConnections parameter is changed in the file with BI server settings.

See also:

ISysSettings