Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » UltraLite - C and C++ Programming » Application Development » Developing UltraLite applications for Windows Mobile


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 Mobile 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++:

    • samples-dir\UltraLite\CustDB\EVC\EVCCustDB.vcp for eVC 3.0.

    • samples-dir\UltraLite\CustDB\EVC40\EVCCustDB.vcp for eVC 4.0.

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

    • Set a platform of your choice.

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

    • Set an active configuration of your choice.

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

    • Choose Project » Settings.

    • On the Link tab, in the Object/library Modules field, change the UltraLite runtime library entry to the emulator30 directory rather than the emulator directory.

  6. Build the application:

    • Press F7 or choose Build » Build EVCCustDB.exe to build CustDB.

      When eMbedded Visual C++ has finished building the application, it automatically attempts to upload it to the remote device.

  7. Start the MobiLink server:

    • To start the MobiLink server, from the Start menu choose Programs » SQL Anywhere 11 » MobiLink » Synchronization Server Sample.

  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.