This documentation is archived and is not being maintained.

Accessing and Displaying Data (Visual C#)

Visual Studio 2008

In Visual C# applications, you can connect to databases by using ADO.NET technology as exposed in System.Data and related namespaces in the .NET Framework class library. LINQ to SQL is introduced in Visual Studio 2008 and provides simplified, strongly typed query capabilities and an object-relational mapping capability. For more information about working with data, see Accessing Data (Visual Studio).

In Windows Forms applications, the primary user interface control for displaying data retrieved from databases is the DataGridView. For more information, see DataGridView Control (Windows Forms). Connecting data sources to user interface controls such as text boxes and list boxes is greatly simplified through a feature known as data binding. When you bind a control to a field in a data source, changes that were made in one will automatically be reflected in the other. For more information, see Windows Forms Data Binding.

For more information about how to create and manage databases, write stored procedures, and other related information, see SQL Server Projects.

The following links contain information about how to use Visual Studio to access data:

On the Internet, the Data Access and Storage Developer Center is continually updated with new articles and examples.