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

SQL Anywhere 10.0.1 » UltraLite - M-Business Anywhere Programming » Tutorial: A Sample Application for M-Business Anywhere

Introduction to M-Business Anywhere development tutorial Next Page

Lesson 1: Create project architecture

The first lesson describes how to set up the project architecture and creating an UltraLite database for the tutorial.

To create project architecture and empty UltraLite database
  1. Create a directory for this tutorial.

    This tutorial assumes the directory is c:\Tutorial\mbus. If you create a directory with a different name, use that directory throughout the tutorial.

    Create the following subdirectories for platform-specific files:

  2. Configure your web server:

    1. Map a virtual directory named tutorial on your web server to c:\Tutorial\mbus. The URL to access this directory will be http://localhost/tutorial.

      For Microsoft IIS, you can make these changes from the management tool.

      For Apache, make a symbolic link named tutorial from your document root to the c:\Tutorial\mbus directory, or copy the tutorial files into your Apache document root.

    2. Ensure that your web server delivers the following files with MIME type application/octet-stream:

      • .cab
      • .dll
      • .prc
      • .pdb
      • .udb

      For Microsoft IIS, you can make these changes from the management tool. Go to the virtual directory properties and make the changes under HTTP Headers and File Types.

      For Apache, edit the file mime.types in your conf directory.

  3. Create a database using UltraLite in Sybase Central.

    For more information about creating a database, see Creating an UltraLite database from Sybase Central.

  4. Save the database.

    If you are developing an application for Windows or Windows CE, choose File > Save and choose tutcustomer.udb in the WINCE_OS or the WIN32_OS subdirectory of your tutorial directory as the file name.

    If you are developing an application for Palm OS:

    1. From the File menu, choose Export Schema for Palm.

    2. Enter Syb3 as the creator ID.

    3. Save the file as tutcustomer.pdb in the PALM_OS subdirectory of your tutorial directory.

    A note on Palm creator IDs

    The creator ID is assigned to you by Palm. You can use Syb3 as your creator ID when you make sample applications. However, when you create a commercial application, you should use your own creator ID.

    If you are developing a cross-platform application, save the database file in all the above locations.