psConnectionIni - cConnection
Contains the path to the Connections INI file
Type: Property
Access: Read/Write
Data Type: String
Parameters: None
Syntax
Property String psConnectionIni
| Access Type | Syntax |
|---|---|
| Read Access: | Get psConnectionIni to StringVariable |
| Write Access: | Set psConnectionIni to StringVariable/Value |
Description
psConnectionIni contains the path to the Connections INI file.
Setting the Connections INI file at Runtime
You can determine a custom file path for the connections at runtime. This does not change the file path for the Studio, but it can be used to change how your application runs. This may be useful when testing.
You can:
-
Specify a custom file path via the command line using the syntax "dfconnid=". This could be used within the Studio when debugging a program. You could set the "parameters" setting in the "Project Properties" dialog to something like "dfconnid=DFConnId_alt.ini". When the program runs, it would look for the connections INI file in "data\DFConnId_alt.ini".
-
You can set the psConnectionIni property in your program to a file path of your choosing. Normally this is blank, which means it uses the default. You do not normally change this and setting this would be part of a larger custom modification.
When you set a custom connections INI file path via psConnectonIni or the dfconnid= command line, you can use relative pathing or fully qualified pathing. If no path is provided (e.g. MyConnection.ini), the first data folder is used. You can provide workspace specific paths by using the special symbols (first programs folder), (first data folder) or (workspace home workspace). For example, \config.ws would look for a config.ws file in your programs directory.
Because there are a variety of ways to determine the connections INI file path, precedence is applied as follows: 1. If the cConnection psConnectionIni property is defined directly, use that name 2. If the command line parameter is allowed and is passed, use that name 3. If the workspace has a definition (ConnectionIni= setting in config.ws), use that name 4. Otherwise, use the default of data\DFConnId.ini
The derived connections INI file path may be obtained by calling the ConnectionIniFile function.