Setting up SQL Server Compact 3.5

Now that you have connected the emulator to your development machine, you will need to install SQL Server CE on both your development machine and the mobile device.

Installing SQL Server CE on the development machine

The SQL Server Compact 3.5 SP1 package contains all the .cab files we need for deployment to the various supported devices and operating systems. To install SQL Server Compact 3.5 on your development machine, follow these instructions:

  • Download SQL Server Compact 3.5 Service Pack 1 for Windows Mobile from the following URL:

    http://www.microsoft.com/Sqlserver/2005/en/us/compact-downloads.aspx

    The other downloads on the web page are not relevant to this chapter, so we will leave them out for now.

  • Run the downloaded file on your development machine and follow through the setup wizard to the end.

Installing SQL Server CE on the Pocket PC device.

Now that we have installed SQL Server CE on the development machine, we will try to get a copy of the database engine running on the Pocket PC device.

There are a two ways to get Microsoft SQL Server Compact installed on the Pocket PC device:

  • MS Visual Studio automated deployment: If you have added a reference to SQL Server CE in your project, the SQL Server CE database engine will be automatically deployed to the mobile device when you run or debug your application from inside Microsoft Visual Studio.
  • Manual deployment:We can also manually copy the relevant SQL Server CE .cab files to the mobile device and deploy it directly from the device.

We will explore the second approach in the later section. The installation of SQL Server CE earlier creates a bunch of .cab files in the following location:

Program FilesMicrosoft SQL Server Compact Editionv3.5Deviceswce500armv4i

Let's take a look at the SQL Server CE .cab files in detail. You will notice that there are generally three types of files:

Feature

Description

sqlce.device.platform.processor

This .cab file contains the SQL Server CE database engine

sqlce.repl.device.platform.processor

This .cab file contains the SQL Server CE replication functionality

sqlce.dev.language.device.platform.processor

This .cab contains the developer tools such as the Query Analyzer 3.5

To manually install these .cab files to your mobile device, follow these instructions:

  1. Copy the three files (sqlce.dev.*.cab, sqlce.repl.*.cab, and sqlce.*.cab) that correspond to your target device, operating system, and processor to any folder on the mobile device manually. (Example: For English-based Windows Mobile 5/6 Pocket PC devices, the file extension would be ENU.ppc.wce5.armv4i)
  2. Run the sqlce.*.cab file from your mobile device or device emulator first, and the other two .cab files after that in any order.
  3. In each installation a ...successfully installed message will be displayed if the setup did not encounter any problems.

    Tip

    SQL Server CE 3.1 and Windows Mobile 6

    It is interesting to note that Windows Mobile 6 devices and emulators have the SQL Server CE 3.1 database engine already prebuilt into their ROM. This means that a manual database engine install will not be required if you are building your applications on top of SQL Server CE 3.1.

    SQL Server CE 3.1 has some limitations, mainly in that it cannot utilize the rich data features in Microsoft Visual Studio 2008. These rich data features include the Visual Database Tools, Data Source Configuration Wizard, and Data Designer Tools. The examples in this book will all be based on SQL Server CE 3.5.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.68.14