Trying out the MobiLink Synchronization for ASA wizard

This section describes how to try out the MobiLink Synchronization for ASA wizard in a sample application. To get started, create a new workspace and a template application. You do not need to create a SQL database connection, but you do need to create a project.

Before you use the wizard to generate objects for the application, you need to set up a remote database and add at least one publication, user, and subscription to it, and create a PowerBuilder database profile for the remote database. To test the synchronization objects from your application, you need to set up a consolidated database. You can create your own databases, as described in “Preparing consolidated databases” and “Creating remote databases”.

To test the synchronization objects, complete the following steps:

  1. Run the wizard.

  2. Call synchronization objects from your application.

  3. Deploy the application and database files.

  4. Start the MobiLink server.

  5. Run the application.

Run the wizard

The wizard prompts you for a database profile and a publication. Continue through the wizard, selecting default values, and click Finish to generate the synchronization objects.

For help using the wizard, see the chapter on managing databases in the User’s Guide, or place the mouse pointer in any wizard field and press F1.

Call synchronization objects from your application

Open a menu for your application in the Menu painter and add two submenu items to the File menu, called Synchronize and Sync Options. Add the following code to the Clicked event of the Synchronize menu item (appname is the name of your application):

s_appname_sync_parms  s_opt
gf_appname_sync(s_opt)

Add the following code to the Clicked event of the Sync Options menu item:

gf_appname_configure_sync()

Deploy the application and database files

Use the Project painter to deploy the application to the desktop and copy this to all machines that will be connecting remotely to the MobiLink server. You need to copy the remote database to all end-user machines, and either register the database as an ODBC database or include connection parameters in a data source name (DSN) file.

For information on additional files and registry entries required on end-user machines, see “Runtime requirements for synchronization on remote machines”.

Start the MobiLink server

Select MobiLink Synchronization Server from the Utilities folder in the Database painter. In the dialog box, select the Automatic Addition of Users check box. This ensures that the MobiLink name created in the remote database is recognized by the consolidated database. Click OK to start the server.

Run the application

Run the application on the remote machine and select the File>Synchronize and File>Sync Options menu items to test their operation.

The next section describes all the objects generated by the wizard.