Connectors

SQLite Database

The SQLite Database provider connects to a SQLite Database via the SQLite ADO.NET Client Library

Connect to SQLite Database

SELECT, INSERT, UPDATE and DELETE SQL Statements are automatically calculated from the Data Schema. Only those columns in the Schema Map are affected the Key(s) columns define the WHERE condition for UPDATE and DELETE.

In Incremental Mode the IN clause is used to return matching records based on the Key selection in groups of 100.

CommandTimeout

The SQL Command timeout in seconds.

ConnectionString

The SQL Connection String that connects to your database.

Data Source="C:\Users\Sean\Desktop\MySqlLiteDb.sqlite";Password=;

SourceTable

The TABLE or VIEW that the Data source is connected to.

Command

A user defined SQL Query to use instead of SourceTable setting this property overrides SourceTable and makes the Data source read-only.

Data Sync wraps your command text so it appears as an inner query SELECT * FROM (<SQL_QUERY>) T1 to support schema discovery and CommandOrderBy property.

CommandOrderBy

Appends an ORDER BY clause to the Query.

CommandWhere

Appends an WHERE clause to the Query, only when using SourceTable if you have a user defined Query in Command this value is ignored.

Transaction

Specifies the number of commands per SQL Transaction.

Transaction > 0 will create a new Transaction on the connection.

BlobColumn

Defines a column that is a Binary data column where Data Sync uses a separate channel to SELECT and UPDATE this value. This prevents loading these large blob values on the read operation.

This is used with providers that support File based synchronisation operations such as

  • FileSystem
  • SharePoint Document Library
  • Azure Blob Storage
  • Amazon S3 Storage
  • SQL Server

BlobName

Defines a column that returns the name of the Blob i.e. FileName when used with SharePoint.

Project Automation

The SQLite Server provider also exposes helper functions that can be called from Project Automation to update the Data source ExecuteScalar, ExecuteNonQuery, UpdateSourceRow and BackupDatabase.

Caution: Using these methods on the Target connection with a Transaction > 0 will cause a DeadLock since a SQL Transaction is in place.

ExecuteScalar

Method ExecuteScalar creates a SQL Command from the supplied SQL and Parameters values and calls ExecuteScalar against the database.

int ExecuteScalar(string sql, params object[] parameters)

ExecuteNonQuery

Method ExecuteNonQuery creates a SQL Command from the supplied SQL and Parameters values and calls ExecuteNonQuery against the database.

int ExecuteNonQuery(string sql, params object[] parameters)

UpdateSourceRow

Method UpdateSourceRow creates a SQL Command to update a single column in the Data source using the key from the DataCompareItem

bool UpdateSourceRow(string column, object value, DataCompareItemInvariant item)

Used to update the source row from project automation, for example setting a Sync flag once a record has been synchronised.

For example calling this method in the AfterUpdateItem item event to mark a record in the source as synchronised.

public override void AfterUpdateItem(object sender, DataCompareItemInvariant item, object identity)
{
    DataSourceA.UpdateSourceRow("Sync", true, item);
}

Backup Database

Calls the BackupDatabase API on the SQLiteConnection to create a backup file of your Sqlite Database.

void BackupDatabase(string targetFileName)