A data connection string is a kind of
connection string used to specify a
data source. The resource is typically a file path or file name, which can be specified as a relative or absolute path.
Data connection strings are used in
PFF files as well as in logic when data sources are specified, such as when using the
setfile function.
For example, this connection string defines a resource, an
Encrypted CSPro DB data source, and a property defining the password used to open the file:
Census.csdbe|password=MyPa%24%24w0rd%21
Used in logic, this might look like:
setfile(CENSUS_DICT, "Census.csdbe|password=" + encode(PercentEncoding, "MyPa$$w0rd!"));
The properties that can be specified differ for each data source and are documented in the topics describing each data source.
The property
"type" can be used to specify the data source type. Generally, it is not necessary to define a type because it can be deduced from the file extension, but in a couple cases it is necessary. This, for example, is how the
None data source, which does not have a resource, is specified:
The table below lists the type values as well as the default extension for each data source. If no type is explicitly specified, it will be matched based on the extension. If it matches none, the
Text data source is used. In other words, most extensions will map to a Text data source.