Client: (Abort)
ID Name syncstatus lastupdatetime syncerror
1 xxxx 0 (synchronized) 2014-10-13 null
2 XXXX 1 (locally added). Null
3 xxxx 2 (Local modification): 1
4 xxxx 3 (local delete): Null
5 xxxx 4 (synchronization error). Null
Service-side (enabled)
ID Name LastUpdateTime
1 xxxx 2014-10-13 13:50:44
2 xxxx.
3 xxxx.
4 xxxx.
Server Synchronization operations:
LastUpdateTime > Local record maximum lastupdatetime per entry
LastUpdateTime all records less than or equal to the current time, download to add/modify
Synchronize the local to the server:
Gets an array of syncstatus records that are not 0 sent to the server
Server processing:
Syncstatus = 1: Check if the server has a record, none: New,
Yes:
If Syncerror is not 1:false
If Syncerror is 1: Modify
Syncstatus = 2: Check if the server has a record: modify:
No:
If Syncerror is not 1:false
If Syncerror is 1: Modify
syncstatus = 3: Check if the server has a record: Delete none: True
The server returns the processing array:
[
{ID: "111", Syncerror: "0 (Synchronized), 1: (Sync error)" MSG: "Error Report"},
{ID: "Syncerror", "0 (synchronized), 1: (Sync error)" MSG: "Error Report"}
]
The client receives the processing report:
Change the ID under and syncerror=0 the record under field Syncstatus to 0
Server and client database synchronization ideas