Synchronization Parameter Definition Guidelines

Understand guidelines and restrictions when defining synchronization parameters.

Guideline Description
Datetime and time synchronization parameters Synchronization may fail if you use SQL Anywhere as the Unwired Server cache database (CDB) when the synchronization parameter is a datetime or time datatype, since datetime and time columns contain three digits for the fraction portion, making direct comparison incompatible with Unwired WorkSpace.

To compare a datetime or time datatype to a string as a string, use the DATEFORMAT function or CAST function to convert the datetime or time datatype to a string before comparing. For example, this SQL statement is the generated download cursor when attribute c2(datetime) is specified as the synchronization parameter:

SELECT x.* FROM Mydatetime x WHERE ( ( x.c2=:c2 ) OR ( ( x.c2 IS NULL ) AND (:c2 IS NULL ) ) )

Change the statement to:

SELECT x.* FROM Mydatetime x WHERE ( (dateformat(x.c2, 'yyyy-mm-dd hh:mm:ss') = dateformat(:c2, 'yyyy-mm-dd hh:mm:ss') OR ( ( x.c2 IS NULL ) AND (:c2 IS NULL ) ) )
        
Datatype and nullable default values When a synchronization parameter is mapped to an attribute, to maintain consistency between the two, the parameter datatype and nullable fields follow that of the attribute to which it is mapped and become read-only.