Installing and Deploying on a Device (SQL Server Compact)

Microsoft SQL Server Compact 3.5 is installed automatically on the smart device when deploying a managed application created in Microsoft Visual Studio 2008. SQL Server Compact 3.5 Service Pack 1 (SP1) is available with Microsoft Visual Studio 2008 SP1.If you create a native application in Visual Studio 2008 by using Visual C++, you must manually copy the files that install SQL Server Compact on a smart device. For information about 64-bit deployments, see Managing 64-bit Database Applications.

When you build a managed application that references the System.Data.SqlServerCe namespace, and the application is deployed to a smart device or the Pocket PC emulator, Visual Studio automatically checks to see whether the device has the Microsoft .NET Compact Framework and SQL Server Compact client components installed. If these components are not detected, they are automatically installed on the device the first time that you deploy an application that references the System.Data.SqlServerCe namespace.

To deploy an application to a smart device, click Start Debugging on the Debug menu in Visual Studio. Then, choose whether to deploy to a connected smart device or to the Pocket PC emulator. The default installation location on the device is \Windows.

SQL Server Compact 3.5 and SQL Server Compact 3.5 Query Analyzer are installed automatically if you are using Visual Studio 2008 with a smart device project. They require manual installation if you are developing a native application by using Visual C++.

You must manually copy SQL Server Compact 3.5 and SQL Server Compact 3.5 Query Analyzer to the device by copying and extracting the following .cab files from %ProgramFiles%\Microsoft SQL Server Compact Edition\v3.5\Devices\platform\processor\ to the root directory of the device:

  • sqlce.device_type.platform.processor.CAB
  • sqlce.repl.device_type.platform.processor.CAB

A shortcut to SQL Server Compact 3.5 Query Analyzer appears on the Start menu of the device.

To start SQL Server Compact 3.5 Query Analyzer, either click the application name on the Start menu or tap the icon on the device.