Skip to content

DSN

The Data Source node is optional. By default, SRS inherits the connection from the current application.

Connections in an XML file are stored in plain text. For security reasons, we recommend using the jetQuery Connections Manager. Connections stored in the Connections Manager are secured and encrypted.

Attributes

  • name - name of the connection; a command selects it with link="{name}", and a command without link uses the first connection
  • type - connection type; default is mssql
    • mssql - Microsoft SQL Server, Azure SQL DB, Amazon RDS
    • MsExcel (experimental) - Excel (.xlsx) files as a database
  • element value - connection string; an invalid connection string stops the SRS with err/invalid-connectionstring

Two special values of the command link attribute do not need a dsn item:

  • link="self" - virtual query over the results of previous commands (SQLite syntax)
  • link="srs" - lists the SRS definitions of the application

Types

mssql - SQL Server provider

The standard SQL Server provider connects to Microsoft® SQL Server, Microsoft® Azure SQL, and Amazon RDS for SQL Server.

MsExcel provider

Reads an Excel workbook. Every worksheet becomes a separate dataset named after the worksheet, and all values are returned as text. The command body is not used.

Parameters:

  • Path - required; file path relative to the application folder
  • Header - required; True - the first row holds column names, False - columns are named A, B, C...
XML
1
2
3
4
5
6
<srs label="Price list">
  <def>
    <itm model="dsn" name="excel" type="MsExcel">Path="pricelist.xlsx";Header=True</itm>
    <itm model="command" name="pricelist" link="excel"></itm>
  </def>
</srs>

Note

The file system provider (FileSystem) is disabled. A command that uses it returns Type FileSystem not found.