Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » UltraLite - Database Management and Developer Guide » UltraLite SQL reference » UltraLite SQL statements

SYNCHRONIZE statement [UltraLite]

Synchronize an UltraLite database via the MobiLink server.

Syntax
SYNCHRONIZE {
PROFILE sync-profile-name [ MERGE sync-option [ ;... ] ]
| USING sync-option  [ ;... ]
}
sync-option :
sync-option-name = sync-option-value
sync-option-name : string
sync-option-value : string
Parameters
  • sync-profile-name

    The name of the synchronization profile.

  • MERGE clause

    Use this clause when you want to add or override options that are provided in the synchronization profile.

  • USING clause

    Use this clause when you want to specify the synchronization options without referencing a synchronization profile.

  • sync-option

    A string of one or more synchronization option value pairs, separated by semicolons. For example, 'option1=value1;option2=value2'.

  • sync-option-name

    The name of the synchronization option.

  • sync-option-value

    The value for the synchronization option.

Remarks

The synchronization is configured according to the parameters in the synchronization profile, or the parameters can be specified in the statement itself.

By allowing synchronization options to be merged in, developers can choose to omit storing some options in the database (like the MobiLinkPwd for instance).

If a synchronization callback function is defined and registered with UltraLite, whenever a SYNCHRONIZE statement is executed, progress information for that synchronization is passed to the callback function. If no callback is registered, progress information is suppressed.

Side effects

None.

Example

The following example shows the syntax for synchronizing a synchronization profile called Test1 where the MobiLinkPwd has not been stored as part of the profile:

 SYNCHRONIZE PROFILE Test1 MERGE 'MobiLinkPwd=sql'

The following example shows the syntax for adding the publication and uploadonly options to a synchronization profile called Test1.

SYNCHRONIZE PROFILE Test1
   MERGE 'publications=p2;uploadonly=on'

The following example illustrates how to use USING.

SYNCHRONIZE USING 'MobiLinkUid=joe;MobiLinkPwd=sql;ScriptVersion=1;Stream=TCPIP{host=localhost}'

The following example shows the syntax for synchronizing the publication and uploadonly options.

SYNCHRONIZE 
   USING 'publications=p2;uploadonly=on'