Folder Advanced Options

 

 

Use LastModificationTime

If you use this option, GeniusConnect will compare Outlook Item LastModificationTime value with database record modification time.
(a table column MUST be linked to LastModificationTime Outlook column!).

 

If a conflict occurs (Outlook Item and record LastModificationTime differs) you can choose:

 

  1. Ignore the Item
    No action
  2. Outlook data will overrule the database data
    regardless of current action (Load or Store) Outlook data will be saved to the database and will overwrite the database data
  3. Database data will overrule Outlook data
    regardless of current action (Load or Store) database data will be saved to Outlook and will overwrite Outlook Item data
  4. Most recent time wins
    Winner depends on the time value. The most recent value wins.

 

This behavior will apply for all sync directions (Load All, Load Item, Store All, Store Item).


Primary Key storage

 

Requirements for successful implementation of Modification time compare:

 

  1. A table column MUST be linked to the LastModificationTime Outlook column

image\LastModificationColLink.jpg

  1. The table column data type must be able to store date-time values including seconds
  2. Time on all PC’s and servers involved in updating the table MUST be synchronized
  3. If the data is modified by applications, database processes etc. outside GeniusConnect, the database column MUST be updated with current
    (time of update) date time value. (See trigger example below)
  4. If the data is modified by GeniusConnect, the database column MUST contain value which has been provided by GeniusConnect. (your triggers may NOT overwrite the value with other date time value)

 

Note:

Outlook, or other application and Outlook processes can update Outlook Item values which will cause LastModificationTime update outside of GeniusConnect!

 

Compare only LastModificationTime

If checked, GeniusConnect will compare ONLY Outlook item and database record LastModificationTime values, to decide if there is a difference. Other columns will be ignored.
This option can greatly improve the performance!

 

 

All PC’s involved in the synchronization should use same date and time!

(Client PC, Exchange server, Database server)

 


To achieve best synchronization reliability for a folder:

  • Implement the LastModificationTime compare like described above
    Check: Compare only LastModificationTime checkbox
  • Use the “Auto Save on Outlook item change” option (Folder Options)
  • Use the “Delete Outlook Item..” and “Delete database record” option (Folder Options)
  • Use the auto sync options and plan the “Load All” (or “Load All/Store All”)direction for the folder.
    OR
    Implement Database change detection .
    If you are using Database change detection mechanism, you can still use auto sync, but the frequency can be much lower. You can run auto sync with “Load All/Store All” for example only during night hours. This will ensure that also *out of date records get synchronized.

 

*It is possible that the Database change detection or Auto Save fails to synchronize if:
-Database server is down
-Network is down
-other reasons (record locked, timeout from database or Exchange etc…)

 

Example:

MS SQL Server Trigger example to auto update LastModificationTime.

This trigger is part of the MS SQL server example creation script.

CREATE TRIGGER tuAutoUpdateContacts ON [dbo].[CONTACTS]

FOR UPDATE not for replication

as

begin

if @@rowcount = 0

return

 

if not update(gc_LastModificationTime)

begin

update c

 set gc_LastModificationTime = CURRENT_TIMESTAMP

 from CONTACTS c inner join inserted i on (c.OCS_ID=i.OCS_ID)

end

end

 

Folder Options

SQL Commands

Database change detection