Export (0) Print
Expand All

Data Provider for SQL Server CE (SqlServerCe)

SQL Server 2000

System.Data.SqlServerCe provides programmatic access to databases in Microsoft® SQL Server™ 2000 Windows® CE Edition (SQL Server CE) from a Microsoft Visual Studio® .NET application running on a Windows CE-based platform. System.Data.SqlServerCe provides a set of classes designed to expose the functionality of SQL Server CE. For a list of classes in this namespace, see System.Data.SqlServerCe Objects. For more information about the classes in this namespace, see the .NET Compact Framework SDK in Microsoft Visual Studio .NET.

Supported Functionality

System.Data.SqlServerCe provides the following functionality:

  • Consistent access to SQL Server CE data sources.

    Consumer applications that share data can use the SQL Server CE data provider to connect to SQL Server CE data sources, and retrieve, manipulate, and update data.

  • Components for connecting to a database, executing commands, and retrieving results.

    The retrieved results can be processed directly or placed in an ADO.NET DataSet object to be exposed to the user in an ad hoc manner, combined with data from multiple sources, or propagated remotely between tiers.

  • Functionality to developers writing managed code.

    This functionality is similar to that provided by ADO to native COM developers.

  • Index functionality for optimal performance.

    SqlCeCommand.SetRange restricts the set of row entries visible through calls to SqlCeDataReader.Read and SqlCeDataReader.Seek. SqlCeDataReader.Seek allows direct positioning at a key value within the current range.

  • Interfaces needed to interact with the SQL Server CE Replication and Remote Data Access (RDA) objects through the SqlCeReplication and SqlCeRemoteDataAccess classes.
  • SqlCeEngine class methods that enable database creation and compaction.
  • Parameterized query functionality.

    All parameter placeholders must be substituted with question marks (?) in the SqlCeCommand.CommandText property. Named parameters are not supported.

  • Database encryption and password protection.
Provider Limitations

The data provider for SQL Server CE has the following limitations:

  • Support for only one concurrent connection to SQL Server CE data source. Unlike the data provider for SQL Server, however, System.Data.SqlServerCe supports multiple data readers created on the same connection.
  • No support for batch queries. Queries must be a single SQL statement. For example, the following statement is valid:
    SELECT * FROM Customers
    
    

    This statement is not valid:

    SELECT * FROM Customers; SELECT * FROM Customers2
    
    

    Datasets must be refreshed from a SqlCeDataAdapter. If you are using code from a Visual Studio .NET project, you must modify your SQL statement to conform to this restriction.

  • No support for nested or parallel transactions.
  • No support for named parameters.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft