Contents Index Writing a synchronization callback function Deploying UltraLite applications pdf/preface.pdf

UltraLite User's Guide
  Developing UltraLite Applications

Configuring development tools for UltraLite development


[ This section is out of place. Need to consolidate all models, or split into different sections. ]

Most development tools use a dependency model, sometimes expressed as a makefile, in which the timestamp on each source file is compared with that on the target file (object file, in most cases) to decide whether the target file needs to be regenerated.

With UltraLite development, a change to any SQL statement in a development project means that the generated code needs to be regenerated. Changes are not reflected in the timestamp on any individual source file because the SQL statements are stored in the reference database,.

This section describes in general terms a strategy for incorporating UltraLite application development into a dependency-based build environment. The UltraLite plug-in for Metrowerks CodeWarrior automatically provides Palm Computing platform developers with the features described here. For other development tools, you must make the appropriate changes yourself.

For information on the UltraLite plugin for CodeWarrior, see Developing UltraLite applications with Metrowerks CodeWarrior.

For specific instructions on adding embedded SQL projects to a dependency-based development environment, see Configuring development tools for embedded SQL development.

To add UltraLite code generation into a dependency-based development model

  1. Add a dummy file to your development project.

    The development project is defined in your development tool. It is separate from the UltraLite project name used by the UltraLite generator.

    Add a file named, for example, uldatabase.ulg, in the same directory as your generated files.

  2. Set the build rules for this file to be the UltraLite generator command line.

    For example, in Visual C++, use a command of the following form (which should be all on one line):

    "%asany8%\win32\ulgen.exe" -q -c "connection-string" $(InputName) $(InputName).c

    where asany8 is an environment variable that points to your SQL Anywhere installation directory, connection-string is a connection to your reference database, and InputName is the UltraLite project name, and should match the root of the text file name. The output is $(InputName).c.

  3. Compile the dummy file to generate the UltraLite database code.

  4. Add the generated UltraLite database file to your development project.

  5. Add the UltraLite import libraries for your target platform to your include path.

    The import libraries are held in platform-specific directories under the SQL Anywhere 9\UltraLite directory.

  6. When you alter any SQL statements in the reference database, touch the dummy file, to update its timestamp and force the UltraLite generator to be run.


Contents Index Writing a synchronization callback function Deploying UltraLite applications pdf/preface.pdf