Using the MobiLink Synchronization for ASA wizard

What the wizard generates

You use the MobiLink Synchronization for ASA wizard on the Database tab of the New dialog box to create a nonvisual user object and a global external function in your current target, making it easier to add database synchronization capabilities to the target. By default, the wizard also adds two windows, a structure, and a second external (configuration) function.

Table 16-7 shows objects that can be generated by the wizard, listed by their default names, where appname stands for the name of the current application.

Table 16-7: Objects generated by MobiLink Synchronization wizard

Default name

Description

nvo_appname_sync

Nonvisual user object that starts synchronization from the remote client.

gf_appname_sync

Global function that instantiates nvo_appname_sync to start the synchronization.This function includes the logic to start the synchronization with or without a feedback window.

w_appname_sync or w_sync_default_feedback

Optional feedback window that can be used, instead of the standard MobiLink status window, to display synchronization status to the client. Even if you do not use the optional status window, a generated feedback window must be instantiated by the gf_appname_sync function.

gf_appname_configure_sync

Optional global function that calls the w_appname_sync_options window, which allows the user to configure the dbmlsync client.

w_appname_sync_options

Window that allows the application user to change MobiLink connection arguments at runtime.

s_appname_sync_parms

Optional structure used to store runtime information entered by the user in the w_appname_sync_options window.

Wizard options

In addition to the names of objects generated by the MobiLink Synchronization for ASA wizard, the wizard includes fields for the options listed in Table 16-8.

Table 16-8: MobiLink Synchronization for ASA wizard options

Option

Description

Destination library

Select the target PKL file where you want to generate the MobiLink synchronization objects.

Desktop database connection

Select a PocketBuilder database profile or proceed without a database connection.

ODBC data source file

This is the DSN file, a copy of which you will deploy, or have already deployed, to remote devices. Your application uses this DSN to connect to the remote database.

Publication name

Lets you select a publication (or multiple publications) if you specified a database profile for a desktop database connection. If you did not, you can type the name of a publication you want to synchronize.

Override registry settings

Lets you override registry settings from a previous deployment.

Build number

Assigns a build number for MobiLink synchronization objects. To override registry settings from a previous deployment, enter a value that is higher than the value you previously used.

Client logging options

Specifies what information gets written to the synchronization log and whether you save the information to a log file.

Additional command line options

Adds the options you specify to the command line for starting the MobiLink synchronization client. You can click the Usage button to see a list of valid options.

Extended options

Adds extended options you specify. You do not need to enter the “-e” switch for extended options in this field. You can click the Usage button to see a list of valid extended options.

Single quotes must be used for any extended option values requiring quotation marks. You must separate multiple options with semicolons, for example:

scn=on;adr='host=localhost;port=2439'

Host

Sets the host information for connecting to the MobiLink Synchronization Server. If you enter a value for this field, it overrides any value set in synchronization subscriptions and in the Extended Options field.

Port

Sets the port for connecting to the MobiLink Synchronization Server. The default port for MobiLink is 2439. The value you enter for this field overrides any value set in synchronization subscriptions and in the Extended Options field.

For more information about a wizard option, click inside the option field and press F1 for online Help.

About the desktop database profile field

The wizard prompts you for a database profile, which it uses to establish a connection to a remote database on the desktop. If you are not testing a connection on the desktop, you can select the option to proceed without a database connection and ignore the database profile field.

NoteUsing a remote database on the desktop The remote desktop database defined by a database connection profile can be the database you plan to deploy to Windows CE devices or a database that you use for testing on the desktop only.

A database profile is required for automatic retrieval of publication names in the database. A publication is a database object describing data to be synchronized. A publication, along with a synchronization user name and a synchronization subscription, is required for MobiLink synchronization.

About the publication name field

The wizard lets you select multiple publication names if they exist in the remote database defined by the connection profile. There must be subscriptions associated with the publication in order for them to display in the publication selection list.

If you selected the option to proceed without a database connection, the wizard prompts you to type a publication name (or a comma-separated list of publication names) in the MobiLink Client Publication wizard page instead of prompting you to select publication names retrieved from the database.

For more information about publications, see the Publishing Data section of the MobiLink Client Administration book in the SQL Anywhere Studio online book collection.

StepsTo add objects for MobiLink synchronization

  1. Select File>New from the PocketBuilder menu bar.

  2. Click the Database tab, select the MobiLink Synchronization for ASA wizard, and click OK.

  3. Follow the instructions in the wizard, providing the information the wizard needs.

    On the last page of the wizard, make sure the Generate To-Do List check box is selected if you want the wizard to add items to the To-Do List to guide and facilitate your development work.

  4. When you are satisfied with your choices in the wizard, click Finish.

    The wizard generates objects that you can use for database synchronization.

    For information about using the generated objects to synchronize a target database, see the chapter on MobiLink synchronization in the Resource Guide.