Enhanced support for MobiLink synchronization

MobiLink is a session-based synchronization system that allows two-way synchronization between a main database, called the consolidated database, and multiple remote databases. The ASA MobiLink Synchronization wizard on the Database tab of the New dialog box creates objects that facilitate control of database synchronization from a PowerBuilder application.

Modifications to the wizard

In PowerBuilder 11, system objects have been added to enable MobiLink functionality to work with .NET applications. Although the ASA MobiLink Synchronization wizard still generates objects that facilitate control of database synchronization from PowerBuilder applications, the main nonvisual object generated by the wizard is now an instance of the MLSync system object (that inherits from the MLSynchronization base class).

The wizard no longer generates a global structure object for storage of synchronization parameters entered by the user, but the synchronization window that it generates uses the SyncParm system structure instead. These differences apply even in targets that are not deployed to .NET platforms.

NoteMigrating MobiLink objects In PowerBuilder 10.5 MobiLink applications that you migrate to PowerBuilder 11, Sybase strongly recommends that you rerun the MobiLink wizard and generate new synchronization objects. You must rerun the wizard if you are deploying to .NET Windows Forms targets.

Synchronization applications that you migrate can still work with standard PowerBuilder applications without rerunning the wizard, but you must modify the library object references in the pb_run_dbmlsync and pb_cancel_dbmlsync functions of the wizard-generated nvo_appname_mlsync object. For PowerBuilder 11, the referenced library for these functions must be pbodb110.dll, not pbvm105.dll.

The following table shows objects that can be generated by the wizard, listed by their default object 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. In PowerBuilder 10.5, this was a simple nonvisual user object.

NoteName change for PowerBuilder 11 The default suffix “_mlsync” replaces the “_sync” default suffix used by earlier versions of the wizard.

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.

NoteName change for PowerBuilder 11 The default suffix “syncprogress” replaces the “_sync” default suffix used by earlier versions of the the wizard.

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

Optional window that allows the application user to change connection arguments at runtime.

Creating an instance of MLSync

With the new MLSync system object in PowerBuilder 11, you no longer have to use the MobiLink Synchronization Wizard to create a nonvisual object that launches Dbmlsync.exe. You can include an MLSync object in your applications:

For more information about MobiLink synchronization, see the chapter on “Managing the Database” in the User’s Guide and the chapter on “Using MobiLink Synchronization” in Application Techniques. For more information on system objects related to synchronization, and their functions, events, and properties, see MLSynchronization, MLSync, and SyncParm in the online Help.

Auxiliary objects for MobiLink synchronization

If you create an instance of MLSync by PowerScript code or from the New dialog box, you should also consider using auxiliary objects that can be generated automatically by the wizard, or that you can customize in the PowerBuilder Window painter.

The chapter on MobiLink synchronization in Application Techniques includes a section describing the default progress and options windows and suggestions for customizing them.