System.Data.SqlClient Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The System.Data.SqlClient namespace is the .NET Data Provider for SQL Server.
Classes
| Name | Description |
|---|---|
| SqlBulkCopy |
Lets you efficiently bulk load a SQL Server table with data from another source. |
| SqlBulkCopyColumnMapping |
Defines the mapping between a column in a SqlBulkCopy instance's data source and a column in the instance's destination table. |
| SqlBulkCopyColumnMappingCollection |
Collection of SqlBulkCopyColumnMapping objects that inherits from CollectionBase. |
| SqlClientFactory |
Represents a set of methods for creating instances of the System.Data.SqlClient provider's implementation of the data source classes. |
| SqlClientPermission |
Enables the .NET Framework Data Provider for SQL Server to help make sure that a user has a security level sufficient to access a data source. |
| SqlClientPermissionAttribute |
Associates a security action with a custom security attribute. |
| SqlCommand |
Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database. This class cannot be inherited. |
| SqlConnection |
Represents a connection to a SQL Server database. This class cannot be inherited. |
| SqlConnectionStringBuilder |
Provides a simple way to create and manage the contents of connection strings used by the SqlConnection class. |
| SqlDataReader |
Provides a way of reading a forward-only stream of rows from a SQL Server database. This class cannot be inherited. |
| SqlError |
Collects information relevant to a warning or error returned by SQL Server. |
| SqlErrorCollection |
Collects all errors generated by the .NET Framework Data Provider for SQL Server. This class cannot be inherited. |
| SqlException |
The exception that is thrown when SQL Server returns a warning or error. This class cannot be inherited. |
| SqlInfoMessageEventArgs |
Provides data for the InfoMessage event. |
| SqlParameter |
Represents a parameter to a SqlCommand and optionally its mapping to DataSet columns. This class cannot be inherited. For more information on parameters, see Configuring Parameters and Parameter Data Types. |
| SqlParameterCollection |
Represents a collection of parameters associated with a SqlCommand and their respective mappings to columns in a DataSet. This class cannot be inherited. |
| SqlRowsCopiedEventArgs |
Represents the set of arguments passed to the SqlRowsCopiedEventHandler. |
| SqlTransaction |
Represents a Transact-SQL transaction to be made in a SQL Server database. This class cannot be inherited. |
Enums
| Name | Description |
|---|---|
| ApplicationIntent |
Specifies a value for ApplicationIntent. Possible values are |
| SortOrder |
Specifies how rows of data are sorted. |
| SqlBulkCopyOptions |
Bitwise flag that specifies one or more options to use with an instance of SqlBulkCopy. |
Delegates
| Name | Description |
|---|---|
| SqlInfoMessageEventHandler |
Represents the method that will handle the InfoMessage event of a SqlConnection. |
| SqlRowsCopiedEventHandler |
Represents the method that handles the SqlRowsCopied event of a SqlBulkCopy. |
Remarks
Note
The System.Data.SqlClient APIs are deprecated. For new development, use the Microsoft.Data.SqlClient APIs.
The .NET Data Provider for SQL Server describes a collection of classes used to access a SQL Server database in the managed space. Using the SqlDataAdapter, you can fill a memory-resident DataSet that you can use to query and update the database.
Note
For conceptual information about using this namespace when programming with .NET, see SQL Server and ADO.NET.