Udostępnij za pośrednictwem


Using SQL Server 2005 Compact Edition 3.1 Databases (Devices)

Developers sometimes use SQL Server 2005 Compact Edition 3.1 in smart device projects because it is built into the ROM of Windows Mobile 6 devices and emulators. The benefit is that Windows Mobile 6 end users do not have to separately install the SQL Server 2005 Compact Edition runtime to run the application.

To use SQL Server 2005 Compact Edition 3.1 in smart device projects, you must install Microsoft SQL Server 2005 Compact Edition Developer Software Development Kit. For information about database technology support in various versions of Windows Mobile, see Device Capabilities and Required Development Tools.

This topic points out some differences in the Visual Studio integrated development environment (IDE) when you use SQL Server 2005 Compact Edition 3.1 instead of SQL Server Compact 3.5.

Automatic Deployment

When you deploy or debug a managed smart device project that uses SQL Server 2005 Compact Edition 3.1, Visual Studio 2008 automatically deploys the runtime only if both Visual Studio 2005 Service Pack 1 and Microsoft SQL Server 2005 Compact Edition Tools for Visual Studio 2005 Service Pack 1 are installed on the development computer. In other words, if those products are not installed on the development computer and the SQL Server 2005 Compact runtime is not installed on the device, then you must manually copy and install the runtime cabinet files to the device before debugging or deploying the project.

The SQL Server 2005 Compact Edition 3.1 runtime cabinet files are located in drive:\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\bin. For more information, see How to: Install SQL Server Compact 3.5 on a Device.

Rich Data Features

Some rich data features in Visual Studio 2008 cannot be used with SQL Server 2005 Compact Edition 3.1 databases. Developers cannot use rich data features such as Visual Database Tools, Data Source Configuration Wizard, and data designer tools in SQL Server Compact Edition 3.1 data projects. Those tools can only be used in SQL Server Compact 3.5 projects. For information about rich data features, see Using SQL Server Compact 3.5 Databases (Devices).

Using SQL Server 2005 Compact Edition 3.1

Because the rich data features cannot be used, you must manually code for your data project by using the System.Data.SqlServerCe data provider (System.Data.SqlServerCe.dll at drive:\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\bin\platform\). For more information, see How to: Use SQL Server 2005 Compact Edition 3.1 in Managed Projects (Devices).

Getting Help

Documentation for SQL Server 2005 Compact Edition is not installed locally. To download, visit SQL Server 2005 Compact Edition Books Online.

For documentation about version 3.1 of the managed data provider, see the System.Data.SqlServerCe namespace in the .NET Framework Library.

Versions of Visual Studio

Rich data features in each version of Visual Studio support a specific version of SQL Server Compact/Mobile. The following table maps the supported version of SQL Server Compact/Mobile to the corresponding version of Visual Studio.

Column heading abbreviations are as follows:

  • SSC 3.5 = SQL Server Compact 3.5

  • SSCE 3.1 = SQL Server 2005 Compact Edition Version 3.1

  • SQL Mobile 3.0 = SQL Server 2005 Mobile Edition Version 3.0

Rich Data Feature Support

SSC 3.5

SQL CE 3.1

SQL Mobile 3.0

Visual Studio 2008

X

 

 

Visual Studio 2005 SP1

 

X*

Visual Studio 2005

 

 

X

*To enable rich data features for SQL Server 2005 Compact Edition Version 3.1 in Visual Studio 2005 SP1, install Microsoft SQL Server 2005 Compact Edition Tools for Visual Studio 2005 Service Pack 1. If the tools are not installed, Visual Studio 2005 Service Pack 1 continues to support data designer tools for SQL Server 2005 Mobile Version 3.0.

Upgrading to SQL Server Compact 3.5

You can upgrade managed data projects to take advantage of rich data features in Visual Studio and enhancements in SQL Server Compact 3.5. To upgrade a project created in Visual Studio 2008, see How to: Upgrade Managed Projects to SQL Server Compact 3.5 (Devices).

For information about how to upgrade data projects that were created in previous versions of Visual Studio, see Updating Projects Created with Previous Tools.

See Also

Tasks

How to: Use SQL Server 2005 Compact Edition 3.1 in Managed Projects (Devices)

How to: Upgrade Managed Projects to SQL Server Compact 3.5 (Devices)