Lesson 1: Setting 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.

 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 Creating an UltraLite 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

 Deploy a synchronization model
  1. Create a synchronization model from Sybase Central. For more information about creating a synchronization model, see Setting up a MobiLink application with the Create Synchronization Model Wizard.

    Use tutorial as the synchronization model name and 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, 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 Synchronization model deployment.

    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 click the Existing SQL Anywhere or UltraLite database option to deploy the synchronization model to the UltraLite database, tutorial.udb.

    3. For the Existing Remote Database page, clear 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.