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.
Start eMbedded Visual C++.
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.
Choose Build » Set Active Platform to set the target platform.
Set a platform of your choice.
Choose Build » Set Active Configuration to select the configuration.
Set an active configuration of your choice.
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.
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.
Start the MobiLink server:
To start the MobiLink server, from the Start menu choose Programs » SQL Anywhere 11 » MobiLink » Synchronization Server Sample.
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.
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.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |