-
Notifications
You must be signed in to change notification settings - Fork 1
SQLite Reader
In order to read data from an SQLite database, use the following source definition:
<Source config="[configuration]">sqlite://[SQL query]</Source>
Any SQL query which is supported by SQLite can be passed into the SQL Query
parameter. All resulting fields will be interpreted as strings.
For the configuration
, there are two possibilities:
- Using a connection string directly
- Using a connection string which is located in a text file
Pass the connection string directly into the configuration
of the source tag:
<Source config="Data Source=c:\\Temp\\mydb.db; Version=3">sqlite://select * from MyTable where wage > 1000</Source>
Please note the use of double backslashes inside the string and the substitution of the greater (>, >
) operator in the SQL query (needed for XML compliance).
Parameters can be used inside the connection string, if needed.
In order to read the connection string from a file, use the following syntax (using the @
character):
<Source config="@sqlite_connection.txt">sqlite://select * from MyTable where wage > 1000</Source>
Sample content of the sqlite_connection.txt
file, also using a parameter (§env§
):
Data Source=c:\Temp\§env§\mydb.db; Version=3