Administrator
  •  Admin
  • Advanced Member Topic Starter
2006-01-19T00:39:00Z
See also Help File topic: 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 behaviour will apply for all sync directions (Load All, Load Item, Store All, Store Item).


Requirements for successful implementation of Modification time compare:


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

2.The table column data type must be able to store date-time values including seconds

3.Time on all PC’s and servers involved in updating the table MUST be synchronized

4.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)

5.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!


To achieve best synchronization reliability for a folder:

·Implement the LastModificationTime compare like described above

·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" direction for the folder.

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

Sponsor
GeniusConnect documentation search (User Manual Downloads...)
Similar Topics