When a data table is defined to use a SQL Database system connection, the synchronization components include a Sync Query and a Data Query.
The Sync Query is expected to return a value identified as LastUpdate. This value should indicate the date and time the source table in the database was last modified. This value is then compared to the last update value for the data table provided from the Agentry Client. If the date and time value returned by the Sync Query is not newer than the one for the data table, no further processing for the data table occurs.
If the Sync Query LastUpdate value is newer than the Agentry Client’s last update value for the data table, the Data Query is run. This query is expected to return all records for the data table, whether or not an individual record is different in the database. This query is expected to return two columns identified as CODE and VAL to the Agentry Server. The value of the CODE column must be unique within the return set provided by the Data Query.