Building the CustDB sample application

CustDB is a simple sales-status application. It is located in the %SQLANYSAMP12%\UltraLite\ directory of your SQL Anywhere installation.

The CustDB application is provided as a Visual Studio solution.

Note

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.

 Build the CustDB sample application
  1. Start Visual Studio.

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

    • %SQLANYSAMP12%\UltraLite\CustDB\VS8 for Visual Studio 2005.

    • %SQLANYSAMP12%\UltraLite\CustDB\VS9 for Visual Studio 2008 or later.

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

    • Set an active solution platform of your choice.

  4. Build the application:

    • Click 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, click Start » 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 %SQLANYSAMP12%\UltraLite\CustDB\custdb.udb to the root of the device.

    On the device or simulator, execute CustDB.exe, which is located in the project folder under \Program Files.

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 also