7/27/2007 2:22:11 AM
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]The most up-to-date version of this file is available online at the
The SQL Server documentation team welcomes your |
Contents
1.1 New Features in SQL Server Compact 3.5
1.2 Obtaining SQL Server Compact 3.5
1.3 SQL Server Compact 3.5 Books Online
1.4 Microsoft Synchronization Services for ADO.NET
2.0 Installing SQL Server Compact 3.5
3.0 Supported Operating Systems and Platforms for SQL Server Compact 3.5
4.0 Deploying SQL Server Compact 3.5 Applications
6.1 Getting SQL Server Compact 3.5 Assistance
1.0 Introduction
Microsoft® SQL Server™ Compact 3.5 is the next version of SQL Server Compact Edition (version 3.1). The different versions of the product are listed below:
-
Version 3.5: Microsoft SQL Server Compact 3.5
-
Version 3.1: Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition)
-
Version 3.0: Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile)
-
Version 2.0: Microsoft SQL Server 2000 Windows CE Edition 2.0 (SQL Server CE)
SQL Server Compact 3.5 can be deployed on desktop and Tablet PC computers, and on Windows Mobile devices. The development support for SQL Server Compact 3.5 will be 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 will be installed under the directory: %Program Files%\Microsoft Visual Studio 9\Common7\IDE\. These components are tied to Visual Studio and cannot be shipped independently of Visual Studio. SQL Server Compact 3.5 samples and SQL Server Compact 3.5 header files (for native development) are also installed by this .msi file.
-
SQL Server Compact 3.5 (SSCERuntime-ENU.msi): This file installs the SQL Server Compact 3.5 runtime components for desktop computers and Tablet PCs in a central folder: %Program Files%\Microsoft SQL Server Compact Edition\v3.5. The SQL Server Compact 3.5 desktop and Tablet PC computers' 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. 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 will install with Visual Studio 2008 and will also be available as a Web download. SQL Server Compact 3.5 Design Tools MSI will install only with Visual Studio 2008. 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 2005, and any later versions of SQL Server 2005. 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.
-
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.
-
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 2005, and any later versions of SQL Server 2005. 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.
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
-
Support for side-by-side installation together with the previous version (3.1) on desktop and Tablet PC 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. If you then select 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.
-
While creating a new SQL Server Compact 3.5 database or upgrading a database file, you can encrypt the file for Windows CE 4.2 or Windows Mobile 2003 Software for Pocket PC. To do this, use the Upgrade to SQL Server Compact 3.5 Database dialog box. Alternatively, the database file can be encrypted for Windows CE 5.0, Windows CE 6.0, Windows Mobile 5.0, Windows XP, Windows Server 2003, or Windows Vista. The database file encrypted for Windows CE 4.2 and Windows Mobile 2003 Software for Pocket PC will work on all the SQL Server Compact 3.5-supported platforms. The database file encrypted for Windows CE 5.0, Windows CE 6.0, and so on cannot be opened by using Windows CE 4.2 and Windows Mobile 2003 software for Pocket PC. 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: Encryption mode will select the encryption that is the default for the operating system. The encrypted SQL Server Compact 3.5 database will not open on Windows CE 4.2 or Windows Mobile 2003 Software for Pocket PC if Platform Default is selected when you are using any one of the following operating systems.
-
-
Windows CE 5.0
-
Windows CE 6.0
-
Windows Mobile 5.0
-
Windows XP
-
Windows Server 2003
-
Windows Vista
For example, if the database is created on Windows XP, it will select the 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 Software for Pocket PC.
-
Windows CE 5.0
- Engine 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. The encryption will work on all other SQL Server Compact 3.5 supported platforms.
-
-
Windows CE 5.0
-
Windows CE 6.0
-
Windows Mobile 5.0
-
Windows XP
-
Windows Server 2003
-
Windows Vista
-
Windows CE 5.0
- PPC2003 Compatibility: The encryption mode works on all SQL Server Compact 3.5 supported platforms.
-
-
Windows CE 4.2
-
Windows Mobile 2003 Software for Pocket PC
-
Windows CE 5.0
-
Windows CE 6.0
-
Windows Mobile 5.0
-
Windows XP
-
Windows Server 2003
-
Windows Vista
-
Windows CE 4.2
Tools Support
-
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.
-
SQL Server Compact 3.5-based applications can be developed for desktop and Tablet PC computers by using the Visual Basic Express and Visual C# Express editions of Visual Studio 2008.
Core Database Functionality
-
Implements the timestamp (rowversion) data type.
-
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
-
Nested query in SELECT FROM clause
Data Replication
-
Data replication support with SQL Server 2005 by using Synchronization Services for ADO.NET, available for desktop and Tablet PC computers only.
-
Server Tools for 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. 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
-
Supports local TransactionScope on desktop and Tablet PC computers.
-
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.
1.2 Obtaining SQL Server Compact 3.5
SQL Server Compact 3.5 installs with Visual Studio 2008. The SQL Server Compact 3.5 Device runtime .cab files are installed when you select the Smart Device Programmability option during the installation of Visual Studio.
-
Visual Studio is available at the
Microsoft Download Center .
-
SQL Server Compact 3.5 is available at the
Microsoft Download Center .
-
SQL Server Compact 3.5 for Devices is available at the
Microsoft Download Center .
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 desktop and Tablet PC computers, and on Windows Mobile devices. SQL Server Compact 3.5 Books Online is available for download at the
1.4 Microsoft Synchronization Services for ADO.NET
Microsoft Synchronization Services for ADO.NET provides the ability to synchronize data from disparate sources over two-tier, n-tier, and service-based architectures. Rather than just replicating a database and its schema, the Synchronization Services API provides a set of components to synchronize data between Data Services and a local store.
To learn more about this technology, see the product documentation available online at the
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
-
Click Start, click Settings, click System, and then click Remove Programs.
-
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
-
SQL Server Compact 3.5 Core
-
Click Remove.
2.2 Installing and Uninstalling SQL Server Compact 3.5 Runtime on Desktop and Tablet PC Computers
SQL Server Compact 3.5 has a separate installer (SSCERuntime-ENU.msi) for desktop and Tablet PC computers. SQL Server Compact 3.5 installs with Visual Studio 2008 or it can be downloaded from
Note: |
---|
SQL Server Compact 3.5 should be installed on desktop and Tablet PC 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 desktop or Tablet PC computer.
-
Unless you are using the OLEDB data provider, the .NET Framework 2.0 or a later version is required before you install SQL Server Compact 3.5. You can download the .NET Framework 2.0 from
.NET Framework 2.0 Download Center .
-
You do not need Visual Studio or SQL Server 2005 installed before you install SQL Server Compact 3.5 on desktop and Tablet PC computers. But, to replicate data between SQL Server and SQL Server Compact 3.5, you need SQL Server 2005 or later versions.
-
To develop applications, you can use OLEDB or ADO.NET. For more robust support, you can install Visual Studio.
To uninstall SQL Server Compact 3.5
-
In Control Panel, double-click Add or Remove Programs.
-
From the list of installed programs, select Microsoft SQL Server Compact 3.5.
-
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
SQL Server Compact 3.5 Server Tools can replicate data between SQL Server Compact 3.5 and SQL Server 2005 or later versions. SQL Server Compact 3.5 Server Tools also support data replication between SQL Server 2005 Compact Edition or SQL Server 2005 Mobile Edition and SQL Server 2005 and later versions. If you are installing SQL Server Compact 3.5 Server Tools on a computer that is running Windows XP SP2 and Windows Firewall, you must specifically enable the HTTP or HTTPS services, or both.
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 enable the HTTP or HTTPS service
-
In Control Panel, double-click Windows Firewall.
-
Click the Advanced tab.
-
In Network Connection Settings, select the connection, and then click Settings.
-
Select Web Server (HTTP) or Secure Web Server (HTTPS), make sure that the server name or IP address is correct, and then click OK.
To uninstall SQL Server Compact 3.5 Server Tools
-
In Control Panel, double-click Add or Remove Programs.
-
From the list of installed programs, select Microsoft SQL Server Compact 3.5 Server Tools.
-
Click Remove.
After uninstalling, restart IIS or restart the server that is running IIS.
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 and Tablet PC 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)
Mobile devices
-
Windows CE 4.2
-
Windows CE 5.0
-
Windows CE 6.0
-
Windows Mobile 2003 for Pocket PC
-
Windows Mobile 5.0
-
Windows Mobile 6.0
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
You can deploy a SQL Server Compact 3.5 application to desktop and Tablet PC computers by using ClickOnce support in Visual Studio. The DataDirectory substitution string also simplifies deploying an application. For more information about ClickOnce and DataDirectory, see Installing a Development Environment and Installing and Deploying on a Desktop (SQL Server Compact 3.5) in
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
5.0 Known Issues
-
Time-out in transaction scope might be too short. If the queries in a transaction scope take too long to finish and the transaction scope times out, the data might get committed to the database. To avoid this situation, increase the time-out value.
-
Remove all beta versions of SQL Server Compact 3.5. All CTP and beta installations of SQL Server Compact 3.5 or SQL Server Compact 3.5 for Devices or SQL Server Compact 3.5 Design Tools should be removed before you install the release version of SQL Server Compact 3.5 or Visual Studio 2008.
-
Encryption of SQL Server Compact 3.5 database file (*.sdf). The SQL Server Compact 3.5 database files can be only encrypted either:
-
When creating the database file.
-
When upgrading a SQL Server 2005 Compact Edition or SQL Server 2005 Mobile Edition database file (*.sdf) to SQL Server Compact 3.5.
-
When creating the database file.
-
After a SQL Server Compact 3.5 database file has been created or upgraded from the earlier version, the encryption mode (Platform Default, Engine Default, PPC2003 Compatibility) cannot be changed. And, an unencrypted database file cannot be encrypted. The Encryption Mode token in SqlCeConnectionString will be ignored when you open an existing SQL Server Compact 3.5 database. The Encrypt token is not used in SqlCeConnectionString. The token is retained in SQL Server Compact 3.5 for backward compatibility. The token should not be used; it will be deprecated in future. To change the encryption mode of an existing SQL Server Compact 3.5 database or to encrypt an unencrypted SQL Server Compact 3.5 database, create a new SQL Server Compact 3.5 database. Then, copy the schema and data to the new database.
-
Upgrading a Visual Studio 2005 project to Visual Studio 2008 causes the following.
-
Project references to System.Data.SqlServerCe.dll v3.0/v3.1 is upgraded to System.Data.SqlServerCe.dll v3.5.
-
Client invariant name is upgraded from Microsoft.SqlServerCe.Client to Microsoft.SqlServerCe.Client.3.5 in all settings (xsd, application settings, etc.).
-
Unencrypted SQL Server 2005 Compact Edition or SQL Server 2005 Mobile Edition database file is upgraded to SQL Server Compact 3.5.
- The following must be manually upgraded.
-
- Encrypted SQL Server 2005 Compact Edition or SQL Server 2005 Mobile Edition database file must be upgraded to SQL Server Compact 3.5 by using:
-
The Upgrade to SQL Server Compact 3.5 Database dialog box. To access:
-
Click Data.
-
Click Add New Data Source.
-
Click Add Connection. If an earlier version of the database file is opened, a message appears. If you select OK, the Upgrade Database dialog box appears.
-
Click Data.
-
The SqlCeEngine.Upgrade() API.
- SQL Server 2005 Compact Edition ClickOnce files are not upgraded during the project upgrade in Visual Studio 2008. The application must be republished in Visual Studio 2008. For more information, see the Visual Studio documentation.
-
The Upgrade to SQL Server Compact 3.5 Database dialog box. To access:
-
Project references to System.Data.SqlServerCe.dll v3.0/v3.1 is upgraded to System.Data.SqlServerCe.dll v3.5.
6.0 Additional Information
This section describes how to obtain assistance or provide feedback about SQL Server Compact 3.5.
6.1 Getting SQL Server Compact 3.5 Assistance
For more information, see the
6.2 Providing Feedback on SQL Server Compact 3.5
To provide suggestions and bug reports about SQL Server Compact 3.5:
-
Make suggestions and file bug reports about the features or the user interface of SQL Server Compact 3.5 at the
MSDN product feedback Web site .
-
Send suggestions or report inaccuracies in the documentation by using the feedback functionality in SQL Server Compact 3.5 Books Online.