UltraLite User's Guide
Tutorial: Build an Application Using the C++ API
In this tutorial, you use the original copy of the UltraLite 9.0 Sample database (CustDB) as a reference database. The copy you placed in the APITutorial directory serves as a backup copy.
An UltraLite database template is a set of tables, and columns within tables, that are to be included in your UltraLite database. You create an UltraLite database template by creating a publication in the reference database. The publication is simply a convenient device for assembling tables and column-based subsets of tables: there is no direct connection to SQL Remote or MobiLink synchronization.
You can also define your UltraLite database by adding SQL statements to the reference database. SQL statements allow you to include joins and more advanced features in your UltraLite application. Here, we build an UltraLite database template by defining tables, as it is more simple.
The Java tutorial uses SQL statements to define the UltraLite database. For an example of how to add SQL statements to a database, see Lesson 1: Add SQL statements to your reference database.
To create the UltraLite database template
Start Sybase Central.
Connect to the UltraLite 9.0 Sample database.
Choose Tools
If a list of plugins is displayed, choose Adaptive Server Anywhere.
In the Connect dialog, choose the UltraLite 9.0 Sample ODBC data source.
Click OK to connect.
Create a publication that reflects the data you wish to include in your UltraLite database.
In Sybase Central, open the custdb database.
Open the SQL Remote folder. Open the Publications folder, and click Add Publication. The Publication Creation wizard appears.
Add the ULProduct table to the publication, including all columns in the publication.
Click Finish to create the publication.
You have now finished designing the UltraLite database template. Leave Sybase Central and the database server running for the next lesson.