Setting up for the tutorial

Before you start the tutorial, you need to make sure that you can connect to a database and that you have the tutorial files.

NoteSQL Anywhere version The databases in this tutorial are SQL Anywhere 10 databases. If you are using SQL Anywhere Studio 8.x or 9.x with Adaptive Server Anywhere databases, see the tutorial lessons in the previous version of this book on the Sybooks Web site.

Connecting to a database

The tutorial uses the SADemo_10 demonstration database that installs with PocketBuilder 2.5. PocketBuilder also installs command scripts that you use to create remote and consolidated databases for the SalesDB tutorial lesson. The MakeDB.cmd script creates Adaptive Server Anywhere 9 databases and the MakeDB10.cmd script creates SQL Anywhere 10 databases. SQL Anywhere databases require the Sybase SQL Anywhere database and server engines. If you do not already have SQL Anywhere on your local machine or server, you must install it now.

When you install SQL Anywhere 10 to your device, make sure you select the International Components for Unicode (ICU) check box. For the SalesDB tutorial lesson, you also need to select the MobiLink Synchronization check box in the SQL Anywhere 10 installation program. If you did not select these check boxes when you installed SQL Anywhere, you must reinstall it to the device with these components selected. You can reinstall SQL Anywhere from the desktop Start menu when you are connected to the device with ActiveSync.

Some Pocket PC 2002 devices can freeze while running SQL Anywhere 10 applications. For lessons using SQL Anywhere 10 databases, you should use Pocket PC 2003, Windows Mobile 5, or Windows Mobile 6 devices.

NoteAdaptive Server Anywhere 9 If you are using Adaptive Server Anywhere 9, see the tutorial lessons in the Introduction to PocketBuilder for the PocketBuilder 2.0 release. This book remains available on the Sybooks Web site.

Requirements

To test the applications you develop in the tutorial on the Pocket PC, you must have an ARM-based device or emulator.

Before you begin Lesson 4, “Creating an Employee List,” make sure you have the PocketBuilder Virtual Machine (VM) as well as SQL Anywhere installed on your deployment device or emulator. For Lesson 5, “Creating a Sales Application,” you also need MobiLink Client on the deployment device or emulator. For information, see the PocketBuilder or SQL Anywhere Installation Guide.

The Tutorial directory

The tutorial also uses the files listed in Table 3-3.

Table 3-3: Files required by the PocketBuilder tutorial

File

Contents

ASADemo_10.db and ASADemo_10.log

The database and log file that you use in Lesson 3, “Connecting to the Database” and Lesson 4, “Creating an Employee List.” These files are installed in the Code Examples\SADemoData/SA10 directory.

MakeDB10.cmd

A command file located in the Tutorial\SalesDB\db directory that creates the remote and consolidated databases for Lesson 5, “Creating a Sales Application”

tutorial.ico

An icon located in the Tutorial\HelloWorld directory

The Tutorial\Solutions directory

The Tutorial\Solutions directory has solutions for the HelloWorld, EmployeeList, and SalesDB lessons. The EmployeeList and SalesDB solution PKLs in the main Tutorial\Solutions directory presume you are using Adaptive Server Anywhere 9 databases. Separate subdirectories under Tutorial\Solutions\SQL Any 10.0 contain solutions for these lessons when you use SQL Anywhere 10 databases.

The solutions contain all the objects and scripts that you create in the tutorial, as well as workspace and target files. You can use this solutions library as a reference if you need to.