.NET Compact Framework Data Provider for SQL Server Mobile

This .NET Framework Class Library is provided by Microsoft. The main functionality of the class library is contained in the file system.data.sqlserverce.dll.

Add a reference to the assembly System.Data.SqlServerCe and include the System.Data.SqlServerCe namespace. Instantiate a new SqlCeConnection connection object. Set the connection string and open the connection.

VB.NET code sample
Imports System.Data.SqlServerCe
Dim myConnection As SqlCeConnection = New SqlCeConnection()
myConnection.ConnectionString = myConnectionString
myConnection.Open()
' execute queries, etc
myConnection.Close()
C# code sample
using System.Data.SqlServerCe;
SqlCeConnection myConnection = new SqlCeConnection();
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
// execute queries, etc
myConnection.Close();

Description

The System.Data.SqlServerCe namespace is the .NET Compact Framework Data Provider for SQL Server Mobile. The .NET Compact Framework Data Provider for SQL Server Mobile is a collection of classes that is used in the managed development environment to provide smart devices access to SQL Server Mobile databases. With System.Data.SqlServerCe, you can create and manage SQL Server Mobile databases on a smart device and also establish connections to SQL Server databases.

More info about this class library can be found at the Microsoft product page.

Download

There is no '.NET Compact Framework Data Provider for SQL Server Mobile' installation package to download. (if you know about an installation package URL you can contribute to the community by submitting the info to us through this message form)

Connection Strings

The .NET Compact Framework Data Provider for SQL Server Mobile class library can be used to connect to the following data sources by using the following connection string references:

SQL Server Compact