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

SQL Anywhere 12.0.0 » UltraLite - M-Business Anywhere Programming » Tutorial: A sample application for M-Business Anywhere

 

Lesson 1: Set up databases

This lesson describes how to create a remote database for the tutorial and how to deploy a synchronization model to a consolidated database.

 To set up a database
  1. Create a directory for this tutorial. This tutorial assumes the directory is c:\tutorial. If you create a directory with a different name, use that directory throughout the tutorial.

  2. Create an UltraLite database using Sybase Central with the following information. (For more information about creating a remote database, see Create a database with the Create Database Wizard.)

    • Table name   Customer

    • Columns  

      Column Name Data Type (Size) Column allows NULL values? Default value
      ID integer No autoincrement
      GivenName char(15) No None
      Surname char(20) No None
      City char(20) Yes None
      Phone char(12) Yes None
      Street char(50) No None

  3. Save the remote database file for the following platforms:

    • Windows   c:\tutorial\WIN32_OS\tutorial.udb

    • Windows Mobile   c:\tutorial\WIN32_CE\tutorial.udb

 To deploy a synchronization model
  1. Create a synchronization model from Sybase Central. For more information about creating a synchronization model, see Creating synchronization models.

    Use c:\tutorial as the work folder for the synchronization model file. For the Consolidated Database Schema page and the Remote Database Schema page, use the following settings:

    1. For the Consolidated Database Schema, use the SQL Anywhere sample database, demo.db, to obtain the schema.

    2. For the Remote Database Schema, use the UltraLite sample database, tutorial.udb (or .pdb), to obtain the schema.

    3. Use the defaults for all other pages of the wizard.

  2. Deploy a synchronization model from Sybase Central. For more information about deploying synchronization models, see Deploying synchronization models.

    1. For the Consolidated Database Deployment Destination page, use the SQL Anywhere sample database as the consolidated database.

    2. For the Remote Database Deployment page choose the Existing SQL Anywhere or UltraLite database option to deploy the synchronization model to the UltraLite database, tutorial.udb (or .pdb).

    3. For the Existing Remote Database page, uncheck the connect to the remote database directly to apply the changes option.

    4. For the MobiLink User page, specify the following settings for connecting to the MobiLink server:

      • user name   tutorial

      • password   tutorial

    5. Use the defaults for all other pages of the wizard.

A command file, tutorial_mlsrv.bat, should be generated when you complete the Deploy Synchronization Model Wizard. This command file will be used later in the tutorial.