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

SQL Anywhere 12.0.1 » MobiLink - Getting Started » MobiLink tutorials » Tutorial: Synchronizing with Microsoft Excel


Lesson 3: Creating a table in your MobiLink consolidated database

This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up an Excel worksheet.

In this lesson, you create the RemoteOrders table in the MobiLink consolidated database. The table contains the following columns:

Column Description


A unique identifier for orders.


A unique identifier for products.


The number of items sold.


The order status.


The last modification date of a row. You use this column for timestamp-based downloads, a common technique used to filter rows for efficient synchronization.

 Create the RemoteOrders table
  1. Connect to your database from Interactive SQL.

    You can start Interactive SQL from Sybase Central or at a command prompt.

    • To start Interactive SQL from Sybase Central, right-click the MLconsolidated - DBA database and click Open Interactive SQL.

    • To start Interactive SQL at a command prompt, run the following command:

      dbisql -c "DSN=mlexcel_db"
  2. Execute the following SQL statements in Interactive SQL to create the RemoteOrders table.

    CREATE TABLE RemoteOrders (
        order_id           INTEGER NOT NULL,
        product_id         INTEGER NOT NULL,
        quantity           INTEGER,
        order_status       VARCHAR(10) DEFAULT 'new',
        PRIMARY KEY(order_id)

    Interactive SQL creates the RemoteOrders table in your consolidated database.

  3. Execute the following SQL statement in Interactive SQL to create MobiLink system tables and stored procedures.

    Replace C:\Program Files\SQL Anywhere 12\ with the location of your SQL Anywhere 12 installation.

    READ "C:\Program Files\SQL Anywhere 12\MobiLink\setup\syncsa.sql";

    Interactive SQL applies syncsa.sql to your consolidated database. Running syncsa.sql creates a series of system tables and stored procedures prefaced with ml_. The MobiLink server works with these tables and stored procedures in the synchronization process.

  4. Proceed to Lesson 4: Adding synchronization scripts.