8/17/2007 3:21:03 PM

The most up-to-date version of this file is available online at the Microsoft Download Center.

The SQL Server documentation team welcomes your documentation feedback. We view and investigate all documentation issues but do not answer technical support questions here. For help with technical issues not related to documentation, see Getting Assistance with SQL Server Compact . If it is possible, submit feedback to us in English.

Contents

1.0 Introduction

Microsoft® SQL Server™ Compact 3.5 is the next version of SQL Server Compact Edition (version 3.1). This product includes the following versions.

  1. Version 3.5: Microsoft SQL Server Compact 3.5
  2. Version 3.1: Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition)
  3. Version 3.0: Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile)
  4. Version 2.0: Microsoft SQL Server 2000 Windows CE Edition 2.0 (SQL Server CE)

SQL Server Compact 3.5 can be deployed on Windows desktop computers, and on Windows Mobile devices. The development support for SQL Server Compact 3.5 is provided by Visual Studio 2008. Database administration support will be provided by SQL Server 2008. SQL Server Compact 3.5 components are available in Microsoft Windows Installer (.msi) files as follows:

  • SQL Server Compact 3.5 Design Tools (SSCEVSTools-ENU.msi): This file installs the SQL Server Compact 3.5 design-time components with Visual Studio 2008. The design-time components are the user interface, dialog boxes, and design-time environment, which are used to write applications for SQL Server Compact 3.5. The SQL Server Compact 3.5 design-time components include design-time environment dialogs under the Server Explorer to design applications that use SQL Server Compact 3.5. SQL Server Compact 3.5 header files (for native development) are installed under %Program Files%\Microsoft SQL Server Compact Edition\v3.5\Include.
  • SQL Server Compact 3.5 (SSCERuntime-ENU.msi): This file installs the SQL Server Compact 3.5 runtime components for desktop computers in a central folder: %Program Files%\Microsoft SQL Server Compact Edition\v3.5. The SQL Server Compact 3.5 desktop runtime components are required for developing applications in Visual Studio and for running SQL Server Compact 3.5-based applications on the desktop. This .msi file also installs Microsoft Synchronization Services for ADO.NET components for x86. The Synchronization Services for ADO.NET components are installed at %Program Files%\Microsoft Synchronization Services\ADO.NET\v1.0.
  • SQL Server Compact 3.5 for Devices (SSCEDeviceRuntime-ENU.msi): This file installs the SQL Server Compact 3.5 devices runtime components in %Program Files%\Microsoft SQL Server Compact Edition\v3.5\Devices. The runtime components are required for developing Windows Mobile and Windows CE device-based applications in Visual Studio and for deploying the applications on Windows Mobile devices. SQL Server Compact 3.5 and SQL Server Compact 3.5 for Devices msi files install with Visual Studio 2008 and also available as a Web download. SQL Server Compact 3.5 Design Tools MSI installs only with Visual Studio 2008. SQL Server Compact 3.5 for Devices MSI is installed if the Smart Device Programmability option is selected when you run Visual Studio 2008 setup. The following .msi files will also be available as a Web download:
    • SQL Server Compact 3.5 Server Tools (SSCEServerTools-ENU.msi): SQL Server Compact 3.5 Server Tools MSI is installed on the server that is running IIS. Installation of this .msi file is required to replicate data between SQL Server Compact 3.5 and SQL Server, by using Merge replication or remote data access (RDA). SQL Server Compact 3.5 Server Tools also supports data replication between SQL Server 2005 Compact Edition or SQL Server 2005 Mobile Edition and SQL Server.
    • SQL Server Compact 3.5 Books Online (SSCEBOL-ENU.msi): The Books Online MSI installs the SQL Server Compact 3.5 documentation locally on the computer.

[Top]

1.1 New Features in SQL Server Compact 3.5

SQL Server Compact 3.5 introduces the following features for software developers.

Installation and Database File Upgrade

  1. Support for side-by-side installation together with the previous version (3.1) on desktop computers. If you try to open database files created by using earlier versions, SQL Server Compact 3.5 will give you a message that the file cannot be opened. To open it, the database file first must be upgraded by using the Upgrade to SQL Server Compact 3.5 Database dialog box in Visual Studio 2008. To access the Upgrade to SQL Server Compact 3.5 Database dialog box, click Data, click Add New Data Source, and then click Add Connection. When you try to open an earlier version of the database file, you receive a message. By selecting OK, the Upgrade to SQL Server Compact 3.5 Database dialog box appears. The file name extension of SQL Server Compact 3.5 is *.sdf, which is the same as that of the earlier versions (SQL Server Compact Edition, v. 3.1, and SQL Server 2005 Mobile Edition, v. 3.0). After a database file is upgraded to SQL Server Compact 3.5, you will no longer be able to open the database file by using earlier versions of SQL Server Compact. Database files created by the earlier versions of SQL Server Compact 3.5 can be programmatically upgraded by using the SqlCeEngine.Upgrade API. Refer to the documentation for more information.
  2. To support older operating systems, with older encryption algorithms, and newer, more secure encryption, SQL Server Compact 3.5 supports backward-compatible encryption modes. The encryption modes available in the Upgrade to SQL Server Compact 3.5 Database dialog box are as described in the following list.
    Platform Default: When you create or upgrade SQL Server Compact databases, Encryption mode will select the default encryption for the operating system. By creating a database on one of the newer platforms shown here, older platforms (such as Windows CE 4.2 or Windows Mobile 2003) will be unable to open encrypted SQL Server Compact files. The older platforms do not support the newer encryption algorithms.
    • Windows CE 5.0
    • Windows CE 6.0
    • Windows Mobile 5.0
    • Windows Mobile 6.0
    • Windows XP
    • Windows Server 2003
    • Windows Vista

    For example, if the database is created on Windows XP, it will select encryption for Windows XP. The encrypted database created on Windows XP with the Platform Default option cannot be opened on Windows CE 4.2 or Windows Mobile 2003 for Pocket PC.

    Engine Default: By default, the encryption mode for the SQL Server Compact 3.5 database file will not work on Windows CE 4.2 or Windows Mobile 2003 Software for Pocket PC. This encryption mode will work on all newer SQL Server Compact 3.5 supported platforms.
    • Windows CE 5.0
    • Windows CE 6.0
    • Windows Mobile 5.0
    • Windows Mobile 6.0
    • Windows XP
    • Windows Server 2003
    • Windows Vista
    PPC2003 Compatibility: While less secure, this option can be used to support older and newer operating systems including:
    • Windows CE 4.2
    • Windows Mobile 2003 Software for Pocket PC
    • Windows CE 5.0
    • Windows CE 6.0
    • Windows Mobile 5.0
    • Windows Mobile 6.0
    • Windows XP
    • Windows Server 2003
    • Windows Vista

Tools Support

  1. The Visual Basic Express Edition and Visual C# Express Edition of Visual Studio 2008 now fully support SQL Server Compact 3.5-based applications for desktop computers.
  2. Enhanced SQL Server Compact 3.5 Table Designer in Visual Studio 2008 provides a user interface for creating primary key and foreign key relationships between tables.

Core Database Functionality

  1. Implements the timestamp (rowversion) data type.
  2. Support for Transact-SQL statements has been extended as follows:
    • Nested query in SELECT FROM clause
    • CROSS APPLY and OUTER APPLY
    • CAST and DECIMAL
    • TOP
    • SET IDENTITY INSERT

Data Synchronization

  1. SQL Server Compact 3.5 now includes a new developer oriented, componentized synchronization model by using Synchronization Services for ADO.NET, available for desktop computers only.
  2. Server Tools for configuring Merge Replication and RDA by using SQL Server Compact 3.5 can be downloaded from the Microsoft Download Center. Note that SQL Server Compact 3.5 Server Tools cannot be installed side-by-side with earlier versions of Server Tools on the computer that is acting as the IIS server. SQL Server Compact 3.5 Server Tools can replicate data between SQL Server Compact 3.5 and SQL Server 2005 and later versions. The Server tools can also support synchronization between SQL Server 2005 and SQL Server Compact 3.1. SQL Server Compact 3.5 Server Tools also supports data replication between SQL Server 2005 Compact Edition or SQL Server 2005 Mobile Edition and SQL Server 2005 and later versions.

Programmability

  1. Supports local TransactionScope on desktop computers.
  2. SQL Server Compact 3.5 supports LINQ to SQL. LINQ to SQL is a component of the LINQ project. It provides a run-time infrastructure for managing relational data as objects, without giving up the ability to query. It translates language-integrated queries into Transact-SQL for execution by SQL Server Compact 3.5, and then translates the tabular results back into the objects as defined by the application developer. There is no designer support for SQL Server Compact 3.5 in LINQ to SQL. The SqlMetal.exe utility must be used for SQL Server Compact 3.5. For more information, see the documentation.

[Top]

1.2 Obtaining SQL Server Compact 3.5

1.3 SQL Server Compact 3.5 Books Online

SQL Server Compact 3.5 Books Online provides detailed information about the development, administration, and deployment of SQL Server Compact 3.5 on Windows desktop computers, and on Windows Mobile devices. SQL Server Compact 3.5 Books Online is available for download at the Microsoft Download Center.

After you install SQL Server Compact Books Online, it is available on the Start menu as a stand-alone Help collection. To access this collection from the Visual Studio 2008 documentation and to access F1 Help from Visual Studio 2008, you must add the collection to the Visual Studio Combined Help Collection.

To add SQL Server Compact Books Online to the Visual Studio Combined Help Collection

1. Click Start, point to All Programs, Microsoft Visual Studio 2008, and then click Microsoft Visual Studio 2008 Documentation.

2. In the Visual Studio Combined Help Collection, click Help and then click Index.

3. In the Look for box, enter collection manager, and then click the Help entry under collection manager in the Index.

4. In the Combined Help Collection Manager topic, select SQL Server Compact 3.5, and then click Update VSCC.

5. In the two dialog boxes that open, read the requirements, and then click OK.

6. Close and reopen the Visual Studio Combined Help Collection. SQL Server Compact Books Online is now available in the Table of Contents, Index, Search, and F1 Help for code and the user interface.

1.4 Microsoft Synchronization Services for ADO.NET

2.0 Installing and Uninstalling SQL Server Compact 3.5

This section contains installation-related information.

2.1 Installing and Uninstalling SQL Server Compact 3.5 Runtime on Mobile Devices

SQL Server Compact 3.5 can be deployed on Windows Mobile devices either by manually copying and installing the CAB files, or through Visual Studio. The SSCEDeviceRuntime-ENU.msi file puts the SQL Server Compact 3.5 CAB files for deploying SQL Server Compact 3.5 on the Windows Mobile devices. The CAB files are put into the folder: %Program Files%\Microsoft SQL Server Compact Edition\v3.5\Devices\platform\processor. The cab files description is as follows:

  • SQL Server Compact 3.5 Core (sqlce.platform.processor.cab):
    The sqlce.platform.processor.cab file contains sqlcese35.dll, sqlceqp35.dll, sqlceme35.dll, and System.Data.SqlServerCe.dll.
  • SQL Server Compact 3.5 Replication (sqlce.repl.platform.processor.cab):
    The sqlce.repl.platform.processor.cab file contains sqlceca35.dll, sqlceoledb35.dll, and sqlcecompact35.dll.
  • SQL Server Compact 3.5 Tools EN (sqlce.dev.lang.platform.processor.cab):
    The sqlce.dev.lang.platform.processor.cab file contains isqlw35.exe, a program that implements SQL Server Compact 3.5 Query Analyzer. It also contains sqlceerr35lang.dll, which provides error descriptions for use during development. To use SQL Server Compact 3.5 Query Analyzer, install sqlce.repl.platform.processor.cab.

To uninstall SQL Server Compact 3.5 from a mobile device

  1. Click Start, click Settings, click System, and then click Remove Programs.
  2. To uninstall SQL Server Compact 3.5 components, from the list of installed programs, select the components to uninstall.
    • SQL Server Compact 3.5 Core
    • SQL Server Compact 3.5 Tools
    • SQL Server Compact 3.5 Repl
  3. Click Remove.

2.2 Installing and Uninstalling SQL Server Compact 3.5 Runtime on Windows Desktop Computers

SQL Server Compact 3.5 has a separate installer (SSCERuntime-ENU.msi) for Windows desktop computers. SQL Server Compact 3.5 installs with Visual Studio 2008 or it can be downloaded from Microsoft Download Site.

Note:
SQL Server Compact 3.5 should be installed on desktop computers by the SSCERuntime-ENU.msi only to reduce serviceability problems.

What to consider when you install SQL Server Compact 3.5:

  • To install or uninstall SQL Server Compact 3.5, you must be an administrator on the Windows desktop computer.
  • .NET Framework 2.0 or a later version is required before you install SQL Server Compact 3.5 for managed code development. You can download the .NET Framework 2.0 from .NET Framework 2.0 Download Center. Native developers can use OLEDB without requiring the .NET Framework.

To uninstall SQL Server Compact 3.5

  1. In Control Panel, double-click Add or Remove Programs.
  2. From the list of installed programs, select Microsoft SQL Server Compact 3.5.
  3. Click Remove.

2.3 Installing and Uninstalling SQL Server Compact 3.5 Server Tools

Server Tools for SQL Server Compact 3.5 can be downloaded from the Microsoft Download Center. SQL Server Compact 3.5 Server Tools cannot be installed side-by-side with earlier versions of Server Tools on the server that is running IIS.

For more information about how to install and configure a server environment for Remote Data Access or merge replication, see "Installing a Server Environment" and "Configuring and Securing Server Environment" in SQL Server Compact 3.5 Books Online.

To uninstall SQL Server Compact 3.5 Server Tools

  1. In Control Panel, double-click Add or Remove Programs.
  2. From the list of installed programs, select Microsoft SQL Server Compact 3.5 Server Tools.
  3. Click Remove.

After uninstalling, restart IIS or restart the server that is running IIS.

[Top]

3.0 Supported Operating Systems and Platforms for SQL Server Compact 3.5

This release of SQL Server Compact 3.5 supports the following operating systems.

Desktop computers

  • Microsoft Windows XP Professional SP2
  • Microsoft Windows XP Home Edition SP2
  • Microsoft Windows XP Media Center Edition 2004 SP2
  • Microsoft Windows XP Media Center Edition 2005
  • Microsoft Windows XP Tablet PC Edition SP2
  • Microsoft Windows XP Embedded SP2
  • Microsoft Windows XP Professional x64 SP2 (WOW),
  • Windows Embedded for Point of Service SP2
  • Microsoft Windows Server 2003, Standard Edition SP2
  • Microsoft Windows Server 2003, Enterprise Edition SP2
  • Microsoft Windows Server 2003, Datacenter Edition SP2
  • Microsoft Windows Server 2003 R2, Standard Edition
  • Microsoft Windows Server 2003 R2, Enterprise Edition
  • Microsoft Windows Server 2003 R2, Datacenter Edition
  • Microsoft Windows Server 2003 x64, Standard Edition (WOW)
  • Microsoft Windows Server 2003 x64, Enterprise x64 Edition (WOW)
  • Microsoft Windows Server 2003 x64, Datacenter Edition (WOW)
  • Microsoft Windows Server 2003 R2 x64, Standard Edition (WOW)
  • Microsoft Windows Server 2003 R2 x64, Enterprise Edition (WOW)
  • Microsoft Windows Server 2003 R2 x64, Datacenter Edition (WOW)
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Ultimate
  • Windows Vista Starter Edition
  • Windows Vista Home Basic x64 (WOW)
  • Windows Vista Home Premium x64 (WOW)
  • Windows Vista Business x64 (WOW)
  • Windows Vista Enterprise x64 (WOW)
  • Windows Vista Ultimate x64 (WOW)

Windows Mobile devices

4.0 Deploying SQL Server Compact 3.5 Applications

This section describes support for deploying SQL Server Compact 3.5 applications.

4.1 SQL Server Compact 3.5 Desktop Deployment Support in Visual Studio

4.2 SQL Server Compact 3.5 Mobile Device Deployment Support in Visual Studio

You can use Visual Studio to deploy a SQL Server Compact 3.5 application to either an emulator or a device in the following ways.

A Pocket PC 2003 application can be deployed on the following:

  • Pocket PC 2003 device
  • Pocket PC 2003 emulator
  • Pocket PC 2003 SE VGA emulator

A Windows CE 5.0 application can be deployed on the following:

  • Windows Mobile Version 5.0 Pocket PC device
  • Windows Mobile Version 5.0 Pocket PC emulator
  • Windows Mobile Version 5.0 Pocket PC Phone Edition GSM (virtual radio) emulator
  • Windows Mobile Version 5.0 Pocket PC Phone Edition GSM VGA (virtual radio) emulator
  • Windows Mobile Version 5.0 Pocket PC VGA emulator
  • Windows Mobile Version 5.0 Smartphone device
  • Windows Mobile Version 5.0 Smartphone GSM (virtual radio) emulator
  • Windows Mobile Version 5.0 Smartphone GSM QVGA (virtual radio) emulator
  • Windows CE 5.0 devices

A Windows Mobile Version 5.0 Pocket PC application can be deployed on the following:

  • Windows Mobile Version 5.0 Pocket PC device
  • Windows Mobile Version 5.0 Pocket PC emulator
  • Windows Mobile Version 5.0 Pocket PC Phone Edition GSM (virtual radio) emulator
  • Windows Mobile Version 5.0 Pocket PC Phone Edition GSM VGA (virtual radio) emulator
  • Windows Mobile Version 5.0 Pocket PC VGA emulator

A Windows Mobile Version 5.0 Smartphone application can be deployed on the following:

  • Windows Mobile Version 5.0 Smartphone device
  • Windows Mobile Version 5.0 Smartphone GSM (virtual radio) emulator
  • Windows Mobile Version 5.0 Smartphone GSM QVGA (virtual radio) emulator

A Windows Mobile Version 6.0 application can be deployed on the following:

  • Windows Mobile 6 Standard
  • Windows Mobile 6 Standard Landscape QVGA
  • Windows Mobile 6 Standard QVGA
  • Windows Mobile 6 Classic
  • Windows Mobile 6 Professional
  • Windows Mobile 6 Professional Square
  • Windows Mobile 6 Professional Square QVGA
  • Windows Mobile 6 Professional Square VGA
  • Windows Mobile 6 Professional VGA

[Top]

5.0 Known Issues

6.0 Additional Information