Applicable Versions: 5.00.0050 and above
The DataLocation determines where DataPA looks for the file DataPASetup.dat, that contains the definitions for systems, subjects and links. The DataLocation is accessed when the ClientConfig object is initialised, so any changes must be made before the call to initialise the ClientConfig object. The following code will change the DataLocation for the current and all subsequent sessions:
ABL Syntax
DEFINE VARIABLE chClientConfig AS COM-HANDLE NO-UNDO. CREATE "DataPAClientConfig.ClientConfig" chClientConfig. chClientConfig:DataLocation ="C:\ProgramData\DataPA\". chClientConfig:Initialise_2(). |
Progress .NET For GUI Syntax
DEFINE PRIVATE VARIABLE clientConfig AS DataPAClientConfig.ClientConfig. clientConfig = NEW DataPAClientConfig.ClientConfig(). chClientConfig:DataLocation ="C:\ProgramData\DataPA\". chClientConfig:Initialise(). |
The following code will initialise the ClientConfig object with a DataLocation setting specific to the current session:
ABL Syntax
DEFINE VARIABLE chClientConfig AS COM-HANDLE NO-UNDO. CREATE "DataPAClientConfig.ClientConfig" chClientConfig. chClientConfig:Initialise("C:\ProgramData\DataPA\", 0, false, false). |
Progress .NET For GUI Syntax
DEFINE PRIVATE VARIABLE clientConfig AS DataPAClientConfig.ClientConfig. clientConfig = NEW DataPAClientConfig.ClientConfig(). clientConfig:Initialise(INPUT"C:\ProgramData\DataPA\" , INPUT DataPAClientConfig.SessionManager+DataFileFormatEnum:dat, INPUT FALSE, INPUT FALSE). |
Applicable Versions: 3.00.0001 to 5.00.0049
The data files are loaded from the DataLocation as soon as a DataPA Application object is created. As such, if we want to change the DataLocation, we need to do it BEFORE the DataPA.Application object is created. To facilitate this, the DataPA Automation objects library includes a distinct object called the DataPA.AdminObj. The DataPA.AdminObj has a property called DataLocation to allow us to query and set the DataLocation.
The code to set the DataLOcation should be as follows...
ABL Syntax
CREATE ""DataPA.AdminObj"" chAdminObj.
chAdminObj:DataLocation = “AppServer://localhost/sports2000”.
RELEASE OBJECT chAdminObj.
VB.NET Syntax
Dim AdminObj As New DataPA.AdminObj
AdminObj.DataLocation = “AppServer://localhost/sports2000”
AdminObj = Nothing
Progress .NET For GUI Syntax
AdminObj = New DataPA:AdminObjClass().
AdminObj:DataLocation = “AppServer://localhost/sports2000”.
AdminObj = ?.