Contents Index Building embedded SQL applications Build process for UltraLite embedded SQL applications pdf/preface.pdf

UltraLite User's Guide
  Developing Embedded SQL Applications
    Building embedded SQL applications

Single-file build process


If you have a single file containing embedded SQL code, you can use the SQL preprocessor to run the UltraLite generator when it completes processing of your file. The generator appends extra C/C++ code to the single generated source file.

This single-file build process cannot be used if you wish to use any of the following features:

In these circumstances you must use the general build process. For instructions, see Build process for UltraLite embedded SQL applications .

To build an UltraLite application (one embedded SQL file only)

  1. Start the Adaptive Server Anywhere personal database server, specifying your reference database and a cache size of at least 10 Mb.

  2. Preprocess the embedded SQL source file using the SQL preprocessor, supplied with SQL Anywhere. Do not specify a project. The SQL preprocessor runs the UltraLite generator automatically and appends additional code to the generated C/C++ source file. This step relies on your reference database and on the database server.

    For more information, see Preprocessing your embedded SQL files.

  3. Compile the C or C++ source file for the target platform of your choice. Include

  4. Link all these object files, together with the UltraLite runtime library.

The following diagram depicts the procedure for building your own UltraLite database application. In addition to your source files, you need to create a reference database. As explained below, this database plays dual roles, acting as an instance of the schema used in your application and storing information that the UltraLite analyzer needs to implement your database.

The UltraLite development process for embedded SQL applications.

Contents Index Building embedded SQL applications Build process for UltraLite embedded SQL applications pdf/preface.pdf