System.Data.SqlServerCe Namespace

03/29/2011

5 minutes to read

In this article

The System.Data.SqlServerCe namespace is the managed data provider for SQL Server Compact 4.0. This namespace is a collection of classes that provide access to SQL Server Compact 4.0 databases. By using System.Data.SqlServerCe, you can create and manage SQL Server Compact 4.0 databases from a computer.

The following features are available for creating SQL Server Compact 4.0 desktop and Web applications.

Support for Visual C# and Visual Basic application development in Visual Studio 2010 SP1.

Support for working in Medium (Partial) Trust environment.

The flag SQLServerCompactEditionUnderWebHosting was required to be set, to use SQL Server Compact in ASP.NET Web applications. The flag is removed and SQL Server Compact 4.0 can be used easily as an embedded database in Web applications.

Classes

An enumerator that can be used to iterate through a collection of records in a ResultSet object. The ResultSetEnumerator is not designed to be used directly from within your code. You will get more functionality by working directly with the SqlCeResultSet object.

The exception thrown when the underlying provider returns an error from a Microsoft SQL Server Compact data source when SQL Server Compact attempts to open a database file of an older or newer version.

Initializes a new instance of the SqlCeReplication object. For more information about SQL Server replication, see the SQL Server Books Online. For more information about merge replication with SQL Server Compact, see the SQL Server Compact Books Online.