Microsoft.Data.SqlClient 命名空間

類別

名稱 Description
ActiveDirectoryAuthenticationProvider

此類別實 SqlAuthenticationProvider 作並用於 Active Directory 聯邦認證機制。

SqlAuthenticationInitializer

在開啟第一個 SqlConnection 實例時呼叫,以指定認證連接字串屬性。

SqlAuthenticationParameters

代表由驅動程式傳遞給認證提供者的 AD 認證參數。

SqlAuthenticationProvider

定義認證提供者的核心行為,並提供衍生類別的基底類別。

SqlAuthenticationProviderException

此例外是針對認證過程中發生的任何錯誤所拋出。

SqlAuthenticationToken

代表一個認證憑證。

SqlBatch
SqlBatchCommand

SqlBatchCommand 允許在 SqlBatch 中執行多個 SQL 指令。

SqlBatchCommandCollection

一組包含於 SqlBatch的實例SqlBatchCommand集合。

SqlBulkCopy

這樣可以有效地大量載入 SQL Server 資料表,從其他來源取得資料。

SqlBulkCopyColumnMapping

定義實例資料來源欄位 SqlBulkCopy 與目標資料表欄位之間的映射。

SqlBulkCopyColumnMappingCollection

繼承自 SqlBulkCopyColumnMapping的物件集合CollectionBase

SqlBulkCopyColumnOrderHint

根據資料表上的叢集索引,定義實例目的資料表中 SqlBulkCopy 欄位的排序順序。

SqlBulkCopyColumnOrderHintCollection

繼承自 SqlBulkCopyColumnOrderHint的物件集合CollectionBase

SqlClientFactory

代表一組用於建立 Microsoft.Data.SqlClient 提供者實作資料來源類別實例的方法。

SqlClientLogger

代表 SQL 用戶端記錄器。

SqlClientMetaDataCollectionNames

提供一個常數清單,供 GetSchema(String) 檢索元資料集合的方法使用。

SqlClientPermission

啟用 SQL Server 的 .NET Framework 資料提供者,協助確保使用者擁有足夠的安全等級以存取資料來源。

SqlClientPermissionAttribute

將安全動作與自訂的安全屬性關聯起來。

SqlColumnEncryptionCertificateStoreProvider

Windows 憑證儲存庫金鑰儲存提供者的實作。 此類別允許將儲存在 Windows 憑證儲存庫中的憑證作為欄位主鍵使用。 詳情請參見 「始終加密」。

SqlColumnEncryptionCngProvider

CMK Store 提供者實作,用於使用 Microsoft 密碼學 API:下一代 (CNG) Always Encrypted

SqlColumnEncryptionCspProvider

CMK Store 提供者實作,用於使用 Microsoft CAPI 基礎的加密服務提供者(CSP),Always Encrypted

SqlColumnEncryptionEnclaveProvider
SqlColumnEncryptionKeyStoreProvider

所有金鑰存放區提供者的基底類別。 自訂提供者必須從此類別衍生並覆寫其成員函數,然後使用 RegisterColumnEncryptionKeyStoreProviders(IDictionary<String,SqlColumnEncryptionKeyStoreProvider>)RegisterColumnEncryptionKeyStoreProvidersOnConnection(IDictionary<String,SqlColumnEncryptionKeyStoreProvider>)RegisterColumnEncryptionKeyStoreProvidersOnCommand(IDictionary<String,SqlColumnEncryptionKeyStoreProvider>)註冊。 詳情請參見「 永遠加密」。

SqlCommand

代表一個 Transact-SQL 陳述式或儲存程序,用於對 SQL Server 資料庫執行。 無法繼承這個類別。

SqlCommandBuilder

自動產生單表指令,用於將對 DataSet 的變更與相關 SQL Server 資料庫進行調和。 無法繼承這個類別。

SqlConfigurableRetryFactory

提供不同的重試邏輯提供者,提供一個共通的瞬態錯誤清單。

SqlConnection

代表與 SQL Server 資料庫的連線。 無法繼承這個類別。

SqlConnectionEncryptOption

這些選項用來控制伺服器與用戶端通訊的加密行為。

SqlConnectionStringBuilder

提供簡單的方法來建立和管理 SqlConnection 類別所使用的連接字串內容。

SqlCredential

SqlCredential 提供了一種更安全的登入方式,使用SQL Server驗證來指定密碼。 SqlCredential 由一個使用者 ID 和一個用於SQL Server驗證的密碼組成。 物件中的 SqlCredential 密碼型別為 SecureStringSqlCredential 無法遺傳。 Windows 認證(Integrated Security = true)仍是登入SQL Server資料庫最安全的方式。

SqlDataAdapter

代表一組資料指令及資料庫連線,用於填入 DataSet 並更新 SQL Server 資料庫。 無法繼承這個類別。

SqlDataReader

提供一種從 SQL Server 資料庫讀取僅向前列資料流的方法。 無法繼承這個類別。

SQLDebugging

內建以支援除錯應用程式。 並非直接使用。

SqlDependency

SqlDependency 物件代表應用程式與 SQL Server 實例之間的查詢通知依賴關係。 應用程式可以建立 SqlDependency 物件並註冊以透過事件處理程序接收通知 OnChangeEventHandler

SqlEnclaveAttestationParameters
SqlEnclaveSession
SqlError

收集與 SQL Server 回傳的警告或錯誤相關的資訊。

SqlErrorCollection

收集 .NET Framework Data Provider for SQL Server 所產生的所有錯誤。 無法繼承這個類別。

SqlException

當 SQL Server 回傳警告或錯誤時拋出的例外。 無法繼承這個類別。

SqlInfoMessageEventArgs

提供 InfoMessage 事件的資料。

SqlNotificationEventArgs

代表傳遞給通知事件處理程序的參數集合。

SqlParameter

代表一個參數到 a SqlCommand ,並可選擇地將其映射到 DataSet 欄位。 無法繼承這個類別。 欲了解更多參數資訊,請參閱 參數配置

SqlParameterCollection

代表一組與 相關 SqlCommand 聯的參數及其對 DataSet應到欄位的映射。 無法繼承這個類別。

SqlRetryingEventArgs

代表傳遞給 Retrying 事件的參數集合。

SqlRetryIntervalBaseEnumerator

產生一連串的時間區間。

SqlRetryLogicBase

若發生瞬態條件,會根據重試次數取得下一個時間區間。

SqlRetryLogicBaseProvider

透過 Execute<TResult>(Object, Func<TResult>) or ExecuteAsync<TResult>(Object, Func<Task<TResult>>, CancellationToken) 函式對操作套用重試邏輯。

SqlRetryLogicOption

提供重試邏輯參數,透過方法SqlConfigurableRetryFactory建立類別實SqlRetryLogicBaseProvider例。

SqlRowsCopiedEventArgs

代表傳遞給 的 SqlRowsCopiedEventHandler 參數集合。

SqlRowUpdatedEventArgs

提供 RowUpdated 事件的資料。

SqlRowUpdatingEventArgs

提供 RowUpdating 事件的資料。

SqlTransaction

代表一個在 SQL Server 資料庫中進行的 Transact-SQL 交易。 無法繼承這個類別。

SspiAuthenticationParameters

提供 SSPI 認證期間使用的參數。

SspiContextProvider

提供自訂 SSPI 情境生成的能力。

列舉

名稱 Description
ApplicationIntent

指定 ApplicationIntent的值。 可能的值是 ReadWriteReadOnly

PoolBlockingPeriod

指定 PoolBlockingPeriod 屬性的值。

SortOrder

指定數據列的排序方式。

SqlAuthenticationMethod

描述連接 Azure SQL Database 的用戶端可使用的各種 SQL 認證方法。 詳情請參見 Use Microsoft Entra Authentication

SqlBulkCopyOptions

指定一或多個選項搭配 實體使用的位旗標,SqlBulkCopy

SqlCommandColumnEncryptionSetting

請注意,這些設定無法用來略過加密並存取純文本數據。 詳情請參見 Always Encrypted (資料庫引擎)

SqlConnectionAttestationProtocol

指定認證協議的值。

SqlConnectionColumnEncryptionSetting

請注意,這些設定無法用來略過加密並存取純文本數據。 詳情請參見 Always Encrypted (資料庫引擎)

SqlConnectionIPAddressPreference

指定 TCP 連線期間 IP 位址偏好值。

SqlConnectionOverrides

指定覆蓋值。

SqlNotificationInfo

此列舉提供相依性事件處理程式可接收之不同通知的其他資訊。

SqlNotificationSource

指出相依性事件處理程式所接收通知的來源。

SqlNotificationType

描述可透過 OnChangeEventHandler 參數由 SqlNotificationEventArgs 事件處理程式接收的不同通知類型。

委派

名稱 Description
OnChangeEventHandler
SqlInfoMessageEventHandler

代表將處理 InfoMessageSqlConnection 事件的方法。

SqlRowsCopiedEventHandler

代表處理 SqlRowsCopied 事件 SqlBulkCopy 的方法。

SqlRowUpdatedEventHandler

代表將處理RowUpdatedSqlDataAdapter事件的方法。

SqlRowUpdatingEventHandler

代表將處理RowUpdatingSqlDataAdapter事件的方法。