System.Data.SqlClient 命名空間

System.Data.SqlClient 命名空間是 SQL Server 的 .NET Data Provider。 The System.Data.SqlClient namespace is the .NET Data Provider for SQL Server.



定義驗證初始設定式的核心行為,其可在 app.config file 中註冊,並為衍生類別提供基底。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 執行個體 (instance) 之資料來源中資料行,與執行個體之目的資料表中資料行間的對應。Defines the mapping between a column in a SqlBulkCopy instance's data source and a column in the instance's destination table.


繼承自 CollectionBaseSqlBulkCopyColumnMapping 物件集合。Collection of SqlBulkCopyColumnMapping objects that inherits from CollectionBase.


表示一組方法,用於建立 System.Data.SqlClient 提供者之資料來源類別 (Class) 實作的執行個體。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.


使 .NET Framework Data Provider for SQL Server 可以協助確保使用者具有足夠的安全性等級來存取資料來源。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.


CMK 存放區提供者實作,適用於搭配使用 Microsoft 密碼編譯 API:新一代密碼編譯 (CNG) 與 Always EncryptedThe CMK Store provider implementation for using the Microsoft Cryptography API: Next Generation (CNG) with Always Encrypted.


CMK 存放區提供者實作,適用於搭配使用 Microsoft 以 CAPI 為基礎的密碼編譯服務提供者 (CSP) 與 Always EncryptedThe 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.


自動產生單一資料表命令,以用來讓對 DataSet 進行的變更與相關聯的 SQL Server 資料庫一致。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 由將用於 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.

SqlCredential 無法被繼承。SqlCredential 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 使用 enclave 計算以 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 間的安全工作階段狀態,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.


收集 .NET Framework Data Provider for SQL Server 所產生的所有錯誤。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 提供者的 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 Database 的不同 SQL 驗證方法。 如需詳細資訊,請參閱使用 Azure Active Directory 驗證連接到 SQL DatabaseFor 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).


這個列舉 (Enumeration) 提供不同告知的其他資訊,這些告知可由相依性事件處理常式接收。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.


代表將處理 InfoMessageSqlConnection 事件的方法。Represents the method that will handle the InfoMessage event of a SqlConnection.


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


代表將處理 RowUpdatedSqlDataAdapter 事件的方法。Represents the method that will handle the RowUpdated event of a SqlDataAdapter.


代表將處理 RowUpdatingSqlDataAdapter 事件的方法。Represents the method that will handle the RowUpdating event of a SqlDataAdapter.


SQL Server 的 .NET Data Provider 描述用來存取 managed 空間中 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.