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 - C and C++ Programming » Tutorial: Build an Application Using Embedded SQL

Introduction to embedded SQL development tutorial Next Page

Lesson 1: Create the UltraLite database


You must create an UltraLite database to be used by the tutorial application. One way to do this is to use Sybase Central to create the UltraLite database on the desktop computer. The file containing the UltraLite database is later transferred to the Windows CE device. For this tutorial, create the database on the desktop computer with the file name C:\tutorial\esqldb.udb.

Sybase Central creates the database with the user ID DBA and password sql (UltraLite database passwords are case sensitive; user names are not).

The database has one table named ULProduct that contains the following fields with characteristics as shown:

Pkey Name Data type Nulls Unique
yesprod_idintegernoyes
priceintegernono
prod_namevarchar(30)nono

Copy the database file to the target device using Windows Explorer or the Remote File Viewer tool provided in eMbedded Visual C++. The database connection information in the tutorial program specifies dbf=\esqldb.udb inidcating the database file on the device is located in the root folder of the CE device. The database file may be located anywhere in the file system for the device—provided the connection information is adjusted accordingly. Since the Windows CE file explorer does not show file extensions, the database file is named esqldb.udb to clearly distinguish the database file from the executable file esql.exe