.NET Compact Framework Data Providers
Microsoft® ADO.NET is a set of classes that expose data access services. ADO.NET is an evolutionary improvement to Microsoft ActiveX® Data Objects (ADO). ADO.NET is an integral part of the .NET Compact Framework, providing access to relational data, XML documents, and application data. ADO.NET supports a variety of development needs, including the creation of database-client applications and middle-tier business objects used by applications, tools, languages, or Internet browsers.
Core elements in the ADO.NET architecture are the .NET Compact Framework Data Provider for SQL Server CE (System.Data.SqlServerCe) and the .NET Compact Framework Data Provider for SQL Server (System.Data.SqlClient). These data providers are used to connect to, execute commands in, and retrieve results from databases in Microsoft SQL Server 2000 Windows® CE Edition (SQL Server CE) and Microsoft SQL Server™, respectively.
System.Data.SqlServerCe is used for programming Windows CE .NET-based applications that are semiconnected to or disconnected from SQL Server databases. System.Data.SqlClient is used for programming Windows CE .NET-based applications that have direct connections to SQL Server databases (however, these applications must have network access).
Note This feature has been designed to be used in conjunction with a prerelease version of an anticipated successor to Microsoft Visual Studio .NET. Check the documentation accompanying the commercially released version for any updates.
The following topics in this section provide general programming information about the System.Data.SqlServerCe and System.Data.SqlClient namespaces. This section also contains walkthrough information about how to programmatically perform basic tasks using System.Data.SqlServerCe objects.
- Data Provider for SQL Server CE (SqlServerCe)
- System.Data.SqlServerCe Objects
- Getting Started with System.Data.SqlServerCe
- Advanced Programming Using System.Data.SqlServerCe
- Data Provider for SQL Server (SqlClient)
Setting Up a Project
Before an application can work with ADO.NET, you must configure your projects to reference the .NET Compact Framework data providers that you plan to use.
To create a reference to the .NET Compact Framework data provider
- In an open Microsoft Visual Studio® .NET project, on the Project menu, click Add References.
- On the .NET tab, select either System.Data.SqlServerCe for SQL Server CE or System.Data.SqlClient for SQL Server version 7.0 or later.
Note In some cases, you may need to reference System.Data.Common if your application uses DataAdapter or CommandBuilder classes.
- Click Select, and then click OK.