UltraLite Static C++ User's Guide
Tutorial: Build an Application Using the C++ API
Introduction to the UltraLite C++ API
This tutorial describes how to construct a simple application using the UltraLite C++ API. The application is a Windows console application, developed using Microsoft Visual C++, which queries data in the ULProduct table of the UltraLite 9.0 Sample database.
The tutorial takes you through configuration of Visual C++, in such a way that users of other development platforms should be able to identify the steps required. These steps are supplied so that you can start development of your own applications.
In the tutorial, you write and build an application that carries out the following tasks.
Connects to an UltraLite database, consisting of a single table. The table is a subset of the ULProduct table of the UltraLite Sample database.
Inserts rows into the table. Initial data is usually added to an UltraLite application by synchronizing with a consolidated database. Synchronization is added later in the chapter.
Writes the first row of the table to standard output.
In order to build the application, you must carry out the following steps:
Design the UltraLite database in an Adaptive Server Anywhere reference database.
Here we use a single table from the UltraLite sample database (CustDB).
Run the UltraLite generator to generate the API for this UltraLite database.
The generator writes out a C++ file and a header file.
Write source code that implements the logic of the application.
Here, the source code is main.cpp.
Compile, link, and run the application.
You then add synchronization to your application.