External Data Sources
This section describes the syntaxes of the connection strings (.ConnectionString) and commands (.Command) that are required to access an external database. Such a database connection is defined via the property General.Database[]. xSuite Interface supports the connection of the systems described in this section.
Some of the supported systems are not classical database systems, but applications that use a database internally, from which data can be queried in a similar way to a database table.
Configuration for all systems uses a connection string and a query command. Some of the systems do not have a standard syntax for this, using a proprietary syntax based on SQL.
The connection parameters and the login parameters to all systems are defined by the connection string. The connection string is composed of pairs of keys and values separated by a semicolon:
{key 1}="{value 1}";...;{key n}="{value n}"Embedding the value in quotation marks is only necessary if the semicolon is to be treated as part of the value.
Include at least one fixed Provider in each connection string, to specify the type of system to be addressed. The remaining key names are system-dependent.
You can insert field variables into the database command as dynamic elements (e.g., filter criteria in the WHERE clause of a SELECT query). The two data sources "OLEDB" and "Microsoft SQL Server" also support typed variables in the form @VariableName. Use typed variables wherever possible. The only other option is a pure text replacement using %VariableName%. The variable placeholder will be replaced by the textual representation of the variable value. This must result in a syntactically correct expression for the respective database system. Therefore, in the case of typed values (e.g., a date), always make sure to format the value appropriately in advance (e.g., using the macro ToText()).