System.Data.SqlClient 命名空间

System.Data.SqlClient 命名空间是用于 SQL Server 的 .NET 数据提供程序。 The System.Data.SqlClient namespace is the .NET Data Provider for SQL Server.


定义可以在 app.config 文件中注册的身份验证初始化表达式的核心行为,并为派生类提供基类。Defines the core behavior of authentication initializers that can be registered in the app.config file and provides a base for derived classes.


表示由驱动程序传递给验证提供程序的 AD 验证参数。Represents AD authentication parameters passed by a driver to authentication providers.


定义验证提供程序的核心行为,并为派生类提供基类。Defines the core behavior of authentication providers and provides a base class for derived classes.


表示 AD 身份验证令牌。Represents an AD authentication token.


允许你使用其他源的数据有效地批量加载 SQL Server 表。Lets you efficiently bulk load a SQL Server table with data from another source.


定义 SqlBulkCopy 实例的数据源中的列与该实例的目标表中的列之间的映射。Defines the mapping between a column in a SqlBulkCopy instance's data source and a column in the instance's destination table.


CollectionBase 继承的 SqlBulkCopyColumnMapping 对象的集合。Collection of SqlBulkCopyColumnMapping objects that inherits from CollectionBase.


表示一组方法,这些方法用于创建 System.Data.SqlClient 提供程序对数据源类的实现的实例。Represents a set of methods for creating instances of the System.Data.SqlClient provider's implementation of the data source classes.


表示 SQL 客户端记录器。Represents a SQL client logger.


提供一个常数列表,该列表与 GetSchema 方法一起使用以检索元数据集合。Provides a list of constants for use with the GetSchema method to retrieve metadata collections.


启用用于 SQL Server 的 .NET Framework 数据提供程序,帮助确保用户具有足够的安全级别来访问数据源。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.


将某安全操作与自定义安全特性相关联。Associates a security action with a custom security attribute.


Windows 证书存储的密钥存储提供程序的实现。The implementation of the key store provider for Windows Certificate Store. 借助此类,可将 Windows 证书存储中存储的证书用作列的主密钥。This class enables using certificates stored in the Windows Certificate Store as column master keys. 有关详细信息,请参阅 Always EncryptedFor details, see Always Encrypted.


用于将 Microsoft API 下一代加密技术 (CNG) 与 Always Encrypted 结合使用的 CMK 存储提供程序实现。The CMK Store provider implementation for using the Microsoft Cryptography API: Next Generation (CNG) with Always Encrypted.


用于将基于 Microsoft CAPI 的加密服务提供程序 (CSP) 与 Always Encrypted 结合使用的 CMK 存储提供程序实现。The CMK Store provider implementation for using Microsoft CAPI based Cryptographic Service Providers (CSP) with Always Encrypted.


为 Always Encrypted 的 enclave 提供程序定义接口的基类。The base class that defines the interface for enclave providers for Always Encrypted.


所有密钥存储提供程序的基类。Base class for all key store providers. 自定义提供程序必须从此类中派生而来并重写其成员函数,然后使用 SqlConnection.RegisterColumnEncryptionKeyStoreProviders() 对其进行注册。A custom provider must derive from this class and override its member functions and then register it using SqlConnection.RegisterColumnEncryptionKeyStoreProviders(). 有关详细信息,请参阅 Always EncryptedFor details see, Always Encrypted.


表示要对 SQL Server 数据库执行的一个 Transact-SQL 语句或存储过程。Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database. 无法继承此类。This class cannot be inherited.


自动生成用于协调通过关联的 SQL Server 数据库对 DataSet 所做更改的单表命令。Automatically generates single-table commands that are used to reconcile changes made to a DataSet with the associated SQL Server database. 无法继承此类。This class cannot be inherited.


表示到 SQL Server 数据库的连接。Represents a connection to a SQL Server database. 无法继承此类。This class cannot be inherited.


为创建和管理由 SqlConnection 类使用的连接字符串的内容提供了一种简单方法。Provides a simple way to create and manage the contents of connection strings used by the SqlConnection class.


SqlCredential 提供了更安全的方式来指定使用 SQL Server 身份验证尝试登录的密码。SqlCredential provides a more secure way to specify the password for a login attempt using SQL Server Authentication.

SqlCredential 由用户 ID 和将用于 SQL Server 身份验证的密码构成。SqlCredential is comprised of a user id and a password that will be used for SQL Server Authentication. SqlCredential 对象中的密码是 SecureString 类型。The password in a SqlCredential object is of type SecureString.

无法继承 SqlCredentialSqlCredential cannot be inherited.

Windows 身份验证 (Integrated Security = true) 仍是登录到 SQL Server 数据库的最安全的方式。Windows Authentication (Integrated Security = true) remains the most secure way to log in to a SQL Server database.


表示用于填充 DataSet 和更新 SQL Server 数据库的一组数据命令和一个数据库连接。Represents a set of data commands and a database connection that are used to fill the DataSet and update a SQL Server database. 无法继承此类。This class cannot be inherited.


提供一种从 SQL Server 数据库中读取只进的行流的方式。Provides a way of reading a forward-only stream of rows from a SQL Server database. 无法继承此类。This class cannot be inherited.


包含在内以支持调试应用程序。Included to support debugging applications. 不适合直接使用。Not intended for direct use.


SqlDependency 对象表示应用程序和 SQL Server 实例间的查询通知依赖关系。The SqlDependency object represents a query notification dependency between an application and an instance of SQL Server. 应用程序可以创建一个 SqlDependency 对象并进行注册以通过 OnChangeEventHandler 事件处理程序接收通知。An application can create a SqlDependency object and register to receive notifications via the OnChangeEventHandler event handler.


封装 SqlClient 向 SQL Server 发送的信息,以便启动证明过程并使用 enclave 创建安全会话,SQL Server 使用此会话计算使用 Always Encrypted 保护的加密列。Encapsulates the information SqlClient sends to SQL Server to initiate the process of attesting and creating a secure session with the enclave, SQL Server uses for computations on columns protected using Always Encrypted.


封装 SqlClient 和 SQL Server 内部的 enclave 之间的安全会话状态,可用于计算使用 Always Encrypted 保护的加密列。Encapsulates the state of a secure session between SqlClient and an enclave inside SQL Server, which can be used for computations on encrypted columns protected with Always Encrypted.


收集与 SQL Server 返回的警告或错误有关的信息。Collects information relevant to a warning or error returned by SQL Server.


收集用于 SQL Server 的 .NET Framework 数据提供程序生成的所有错误。Collects all errors generated by the .NET Framework Data Provider for SQL Server. 无法继承此类。This class cannot be inherited.


SQL Server 返回警告或错误时引发的异常。The exception that is thrown when SQL Server returns a warning or error. 无法继承此类。This class cannot be inherited.


InfoMessage 事件提供数据。Provides data for the InfoMessage event.


表示传递给通知事件处理程序的参数集。Represents the set of arguments passed to the notification event handler.


表示 SqlCommand 的参数,或者其与 DataSet 列的映射。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.


表示与 SqlCommand 关联的参数的集合以及各个参数到 DataSet 中列的映射。Represents a collection of parameters associated with a SqlCommand and their respective mappings to columns in a DataSet. 此类不能被继承。This class cannot be inherited.


SQL Server 的 SqlClient 提供程序的 DbProviderServices 实现。The DbProviderServices implementation for the SqlClient provider for SQL Server.


表示传递给 SqlRowsCopiedEventHandler 的参数集。Represents the set of arguments passed to the SqlRowsCopiedEventHandler.


RowUpdated 事件提供数据。Provides data for the RowUpdated event.


RowUpdating 事件提供数据。Provides data for the RowUpdating event.


表示将在 SQL Server 数据库中进行的 Transact-SQL 事务。Represents a Transact-SQL transaction to be made in a SQL Server database. 无法继承此类。This class cannot be inherited.



指定 ApplicationIntent 的值。Specifies a value for ApplicationIntent. 可能值为 ReadWriteReadOnlyPossible values are ReadWrite and ReadOnly.


PoolBlockingPeriod 属性指定一个值。Specifies a value for the PoolBlockingPeriod property.


指定数据行排序方式。Specifies how rows of data are sorted.


介绍可供连接到 Azure SQL 数据库的客户端使用的不同 SQL 身份验证方法。 有关详细信息,请参阅使用 Azure Active Directory 身份验证连接到 SQL 数据库For details, see Connecting to SQL Database By Using Azure Active Directory Authentication.


按位标志,指定要与 SqlBulkCopy 的实例一起使用的一个或多个选项。Bitwise flag that specifies one or more options to use with an instance of SqlBulkCopy.


指定读取和写入加密列时将如何发送及接收数据。 根据特定的查询,正当使用非加密列时跳过 Always Encrypted 驱动程序的处理可能会降低性能影响。 请注意这些设置不能用于绕过加密以及获取纯文本数据的访问权限。 有关详细信息,请参阅 Always Encrypted(数据库引擎)For details, see Always Encrypted (Database Engine).


指定在连接中启用“始终加密”功能。 请注意这些设置不能用于绕过加密以及获取纯文本数据的访问权限。 有关详细信息,请参阅 Always Encrypted(数据库引擎)For details, see Always Encrypted (Database Engine).


此枚举提供有关不同通知的其他信息,这些信息可由依赖项事件处理程序接收。This enumeration provides additional information about the different notifications that can be received by the dependency event handler.


指示依赖项事件处理程序所接收的通知的源。Indicates the source of the notification received by the dependency event handler.


描述 OnChangeEventHandler 事件处理程序可通过 SqlNotificationEventArgs 参数接收的不同通知类型。Describes the different notification types that can be received by an OnChangeEventHandler event handler through the SqlNotificationEventArgs parameter.



处理当收到与 OnChange 对象相关联的任何命令的通知时激发的 SqlDependency 事件。Handles the OnChange event that is fired when a notification is received for any of the commands associated with a SqlDependency object.


表示将处理 SqlConnectionInfoMessage 事件的方法。Represents the method that will handle the InfoMessage event of a SqlConnection.


表示处理 SqlBulkCopySqlRowsCopied 事件的方法。Represents the method that handles the SqlRowsCopied event of a SqlBulkCopy.


表示将处理 SqlDataAdapterRowUpdated 事件的方法。Represents the method that will handle the RowUpdated event of a SqlDataAdapter.


表示将处理 SqlDataAdapterRowUpdating 事件的方法。Represents the method that will handle the RowUpdating event of a SqlDataAdapter.


用于 SQL Server 的 .NET 数据提供程序描述用于访问托管空间中 SQL Server 数据库的类的集合。The .NET Data Provider for SQL Server describes a collection of classes used to access a SQL Server database in the managed space. 使用 SqlDataAdapter,可以填充内存驻留 DataSet,可用于查询和更新数据库。Using the SqlDataAdapter, you can fill a memory-resident DataSet that you can use to query and update the database.


有关使用 .NET 进行编程时使用此命名空间的概念信息,请参阅SQL Server 和 ADO.NETFor conceptual information about using this namespace when programming with .NET, see SQL Server and ADO.NET.