Before an application can be deployed, a project is needed to specify how the application is deployed.
Select File>New.
In the Project tab, select Application and click OK.
The Project painter displays. The default executable file name is salesdb_tutorial.exe.
Pocket PC Device (ARM) is the platform for deployment to an ARM device. Use the default \Program Files location for deployment to the device. For your own applications, you might want to deploy to an application specific directory that you create.
Select the Add Shortcut to “Start Menu” check box to add a Start menu item for the deployed application on the device.
Select File>Save to save the project.
Type p_salesdb_tutorial for the project name and click OK.
Before you can deploy SalesDB to a device or emulator, you must deploy the the local copy of the remote database and the DSN file to the Pocket PC or emulator.
Now you copy the remote database and log file to the Pocket PC. You copy the log file because synchronization subscriptions were added to the remote database during the initialization phase. Synchronization subscriptions can also be added during the first execution of the application. When adding the subscriptions at runtime, you need to deploy only the database file to the device, not the log file.
On your desktop machine, use a text editor to open SalesDB_remote.dsn in the \Tutorial\SalesDB directory.
Make sure that the paths for the database file and the start line (set to the default location) are correct for your Pocket PC device.
Open ActiveSync while a connection to the device is established.
Click Explore.
Double-click My Pocket PC.
My Pocket PC is the root directory.
Copy SalesDB_remote.DSN from your PocketBuilder 2.0\Tutorial\SalesDB directory to the My Pocket PC directory.
On your device, go to the \Programs\Sybase\ASA 9 directory .
Locate the \Tutorial\SalesDB\db\fresh directory on your desktop.
Copy SalesDB_remote.db and SalesDB_remote.log to the \Programs\Sybase\ASA 9 directory on your device.
The following instructions provide you with deployment information for both the Pocket PC 2002 emulator and the Pocket PC 2003 emulator.
In PocketBuilder, you can also deploy an application to an emulator. Here are the instructions for copying the database and log files to an emulator.
On your desktop machine, use a text editor to open SalesDB_remote.dsn in the \Tutorial\SalesDB directory.
Make sure that the paths for the database file and the start line (set to the default location) are correct for your Pocket PC emulator.
Run the Windows CE file viewer, cefilevw.exe, on the desktop.
For the Pocket PC 2002 emulator, you can find cefilevw.exe by default in C:\Program Files\Windows CE Tools\Common Files\Platman\bin.
For the Pocket PC 2003 emulator, you can find cefilevw.exe by default in C:\Program Files\Common Files\Microsoft Shared\Windows CE Tools \Platman\bin.
Using the Windows CE file viewer, copy the SalesDB_remote.dsn from your desktop to the root directory of the emulator file system ( \ ).
If the SalesDB_remote ASA server on the PC is running, stop the server.
When the server is running, an icon in the System Tray displays. The icon disappears when you stop the server.
Locate the \Tutorial\SalesDB\db\fresh directory on your desktop and copy the SalesDB_remote.db and SalesDB_remote.log files to the \Program Files\Sybase\ASA 9 directory on your emulator.
Path to ASA for a device is different from the path
for an emulator
The SalesDB_remote.dsn file sets the DSN on the device
and contains the path to the remote database. However, the path
to ASA for a device is different from the path for an emulator.
Emulator users must edit the DSN file manually (as described in
the previous steps) by removing \Sybase from the paths.
With this setup, the SalesDB_remote database starts automatically
on the Pocket PC when a connection is initiated and terminates automatically
when all connections are closed.
Now you can build the application and deploy it to a device or emulator by running the project object you created in “Create a project” of this lesson.
Double-click the p_salesdb_tutorial_exe project object in the System Tree.
The Project painter opens.
Select Run>Build and Deploy Workspace or click the Deploy button on the PainterBar.
The project is built and deployed and the application is copied to the device’s \Program Files directory.
Next you run the application on the Pocket PC device.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |