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

SQL Anywhere 12.0.0 » 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.

The CustDB application is provided as a Visual Studio solution.

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

 To build the CustDB sample application
  1. Start Visual Studio.

  2. Open the project file that corresponds to your version of Visual Studio.

    • samples-dir\UltraLite\CustDB\VS8 for Visual Studio 2005.

    • samples-dir\UltraLite\CustDB\VS9 for Visual Studio 2008.

    • samples-dir\UltraLite\CustDB\VS10 for Visual Studio 2010.

  3. Choose Build » Set Configuration Manager to set the target platform.

    • Set an active solution platform of your choice.

  4. Build the application:

    • Choose Build » Deploy Solution to build and deploy CustDB.

      When the application is built it will be uploaded automatically to the remote device.

  5. Start the MobiLink server:

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

  6. 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.

    Execute \Program Files\CustDBC#\CustDB.exe on the device or simulator.

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.