You use the ASA MobiLink Synchronization wizard to create a nonvisual user object and a global external function that invokes the MobiLink dbmlsync executable. By default, the wizard also adds two windows and a second global function, but these objects are optional.
The wizard-generated objects make it easier to add database synchronization capabilities to a PowerBuilder target. A structure that inherits from the PowerBuilder SyncParm object is also instantiated by default by one of the wizard-generated global functions. The SyncParm structure is used to hold sensitive database connection parameters entered by an end user in the synchronization options window.
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.
Default name |
Description |
---|---|
nvo_appname_mlsync |
An instance of the MLSync standard class user object that starts synchronization from the remote client. |
gf_appname_sync |
Global function that instantiates nvo_appname_mlsync to start the synchronization. This function includes the logic to start the synchronization with or without a feedback window. |
w_appname_syncprogress |
Optional feedback window that can be used to display synchronization status to the client. |
gf_appname_configure_sync |
Optional global function that calls the w_appname_sync_options window, which allows the user to configure the dbmlsync client before invoking the dbmlsync executable. |
w_appname_sync_options |
Window that allows the application user to change connection arguments at runtime. |
Some information that you enter in the wizard is optional, but other information is required. The wizard prompts you for a database profile, which it uses to establish a connection to a remote database on the development computer. 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.
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.
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 MobiLink - Client Administration on the Technical Library CD or the SQL Anywhere online Help.
By default, information you enter in the wizard is saved in properties of the nvo_appname_mlsync user object that the wizard generates. This information includes values that you select for MobiLink logging and command line options and the MobiLink server and port. Prior to synchronization, the values of these properties can be modified with values entered by an application user in the nvo_appname_sync_options Options window.
The first time synchronization is run, user object property values are entered into the client computer registry. The next time the application is run, this information is available for retrieval from the registry.
The ASA MobiLink Synchronization wizard has an optional Override Registry Settings screen that allows you to override client registry settings. When you enable runtime overrides to the client registry settings, you must assign a build number to the objects generated by the wizard.
The build number you assign can be any positive numeric value. To override the registry settings, the build number you assign must be higher than the build number in the registry, if there is one. Registry settings will be used if the build number in the registry is equal to or lower than the build number in the ObjectRevision property of the nvo_appname_mlsync user object that the wizard generates.
Security measure For security reasons, the MobiLink user name and password, and the authentication parameters and encryption key database settings are never saved to the registry.
The Override Registry Settings page of the wizard displays only if you do not change the radio button option to prompt the application user for password and runtime changes on the previous wizard page (Optional Runtime Configuration Objects). If, however, you change the radio button selection to disallow runtime overrides to the synchronization, the wizard does not display the Override Registry Settings page and does not generate the w_appname_sync_options Options window.