The following procedure creates a remote database for CustDB. The CustDB remote database must be an UltraLite database.
The application logic for the remote database is located in samples-dir\UltraLite\CustDB. It includes the following files:
Embedded SQL logic The file custdb.sqc contains the SQL statements needed to query and modify information from the UltraLite database, as well as the calls required to start synchronization with the consolidated database.
C++ API logic The file custdbcomp.cpp contains the C++ API logic.
User-interface features These features are stored separately, in platform-specific subdirectories of Samples\UltraLite\CustDB.
You complete the following steps to install the sample application to a remote device that is running UltraLite:
To install the sample application to a remote device
Start the consolidated database.
Start the MobiLink server.
Install the sample application to your remote device.
Start the sample application on the remote device.
Synchronize the sample application.
The following example installs the CustDB sample on a Palm device running against a DB2 consolidated database.
For a DB2 LUW database, open a DB2 Command Window. Type the following command, where userid and password are the user ID and password for connecting to the DB2 LUW database:
db2 connect to CustDB user userid using password |
For a DB2 LUW database, at a command prompt, run the following command:
mlsrv11 -c "DSN=CustDB" -zp |
When you start the sample application for the first time, you are prompted to synchronize to download an initial copy of the data. This step is required only the first time you start the application. After that, the downloaded data is stored in the UltraLite database.
From the Applications view, tap CustDB.
An initial window appears, prompting you for an employee ID.
For the purpose of this tutorial, enter a value of 50. The sample application also allows values of 51, 52, or 53, but behaves slightly differently in these cases.
For more information about the behavior of each user ID, see Users in the CustDB sample.
A window tells you that you must synchronize before proceeding.
Use HotSync to obtain an initial copy of the data.
From the Applications view, tap the CustDB application. The display shows an entry sheet for a customer, with entries.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |