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 » Developing UltraLite Applications for Windows CE

Choosing how to link the runtime library Next Page

Building the CustDB sample application

CustDB is a simple sales-status application. It is located in the samples-dir\UltraLite\ directory of your SQL Anywhere installation. Generic files are located in the CustDB subdirectory. Files specific to Windows CE are located in the EVC subdirectory of CustDB.

The CustDB application is provided as an eMbedded Visual C++ 3.0 project.

For a diagram of the sample database schema, see About the CustDB sample database.

To build the CustDB sample application
  1. Start eMbedded Visual C++.

  2. Open the project file that corresponds to your version of eMbedded Visual C++:

  3. Choose Build > Set Active Platform to set the target platform.

  4. Choose Build > Set Active Configuration to select the configuration.

  5. If you are building CustDB for the Pocket PC x86em emulator platform only:

  6. Build the application:

  7. Start the Mobilink server:

  8. Run the CustDB application:

    Before running the CustDB application, the custdb database must be copied to the root folder of the device. Copy the database file named samples-dir\UltraLite\CustDB\custdb.udb to the root of the device.

    Press Ctrl+F5 or choose Build > Execute CustDB.exe.

Folder locations and environment variables

The sample project uses environment variables wherever possible. It may be necessary to adjust the project for the application to build properly. If you experience problems, try searching for missing files in the Microsoft Visual C++ folder(s) and adding the appropriate directory settings.

For embedded SQL, the build process uses the SQL preprocessor, sqlpp, to preprocess the file CustDB.sqc into the file CustDB.cpp. This one-step process is useful in smaller UltraLite applications where all the embedded SQL can be confined to one source module. In larger UltraLite applications, you need to use multiple sqlpp invocations.

See Building embedded SQL applications.