語言

AdoDotNetConnectionSupport 類別

定義

提供 DataConnectionSupport、DataCommand 及 DataTransaction 類別的託管實作,分別使用 ADO.NET IDbConnection、IDbCommand 及 IDbTransaction介面;同時提供一種簡單的實作方式來提供 DataSourceVersionComparer類別的實作。

public ref class AdoDotNetConnectionSupport : Microsoft::VisualStudio::Data::DataConnectionSupport
public class AdoDotNetConnectionSupport : Microsoft.VisualStudio.Data.DataConnectionSupport
type AdoDotNetConnectionSupport = class
    inherit DataConnectionSupport
Public Class AdoDotNetConnectionSupport
Inherits DataConnectionSupport
繼承

建構函式

名稱 Description
AdoDotNetConnectionSupport(String)

職業建造者。 初始化 AdoDotNetConnectionSupport 類別的實例,並指定 ADO.NET 提供者名稱。

屬性

名稱 Description
BaseCommand

擷取 IDbCommand 用於執行此連線指令的主要物件。

Connection

擷取 IDbConnection 目前連線支援實例正在使用的物件。

ConnectionString

擷取或設定建立指定資料來源連接所需資訊的字串表示。

ConnectionTimeout

擷取或設定等待建立連線的時間(秒數),然後終止嘗試並產生逾時錯誤。

CurrentTransactionLevel

取得目前的交易層級。

ExecutingCommand

擷取 IDbCommand 目前用於執行的實例。

PreparedCommands

取得先前已準備的物件清單 IDbCommand 。

ProviderObject

取得指定連線的底層提供者物件。

ServiceTypes

檢索一份用於將指定服務 GUID 的非受管 QueryService 方法呼叫轉換為受管理的 IServiceProvider.GetService 方法呼叫的服務類型清單,該呼叫指定受管理型別。

(繼承來源 ServiceProvider)
Site

擷取或設定網站物件實例。

(繼承來源 ServiceProviderWithSite)
State

取得資料連線的狀態。

Transaction

如果有電流,則取回。IDbTransaction

方法

名稱 Description
BeginTransaction()

啟動交易並返回新的當前交易層級。

Close()

關閉指定的資料連線。

CommitTransaction()

提交交易並回傳新的當前交易層級。

CompareVersions(String, String)

比較兩個資料來源版本字串,並回傳一個值,表示其中一個小於、等於或大於另一個。

CreateDataSourceInformation()

建立一個 DataSourceInformation 物件實例。

CreateObjectIdentifierConverter()

建立一個 DataObjectIdentifierConverter 物件實例。

CreateObjectItemComparer()

建立一個物件實例。

CreateParameter()

建立 DataParameter 物件。

DeriveParameters(String, Int32, Int32)

推導出可為特定指令指定的參數

DeriveSchema(String, Int32, DataParameter[], Int32)

從指定指令中推導出結構,指示特定資料讀取器中項目與區塊的配置。

Dispose()

執行與釋放、釋放或重設資源相關聯的工作。

(繼承來源 DataConnectionSupport)
Dispose(Boolean)

釋放資料連線所持有的所有資源。

Execute(String, Int32, DataParameter[], Int32)

執行指定指令(可選擇性地帶參數),並以物件回傳結果 DataReader 。

ExecuteWithoutResults(String, Int32, DataParameter[], Int32)

執行一個指令(可選擇帶參數),但不請求結果,而是回傳一個整數,表示呼叫的結果。

GetService(Guid)

取得具有指定服務 GUID 的服務。

(繼承來源 ServiceProvider)
GetService(Type)

擷取指定類型的服務。

(繼承來源 ServiceProvider)
GetServiceImpl(Guid)

提供使用特定 GUID 來擷取服務的實作。

(繼承來源 ServiceProvider)
GetServiceImpl(Type)

啟用實作服務檢索。

Initialize(Object)

使用指定的提供者初始化指定的 ADO.NET 連線。

OnSiteChanged(EventArgs)

引發 SiteChanged 事件。

(繼承來源 ServiceProviderWithSite)
Open(Boolean)

開啟指定的資料連線。

Prepare(String, Int32, Int32)

準備對待執行的資料來源所指定的指令;此指令可多次執行,參數各異。

RaiseMessageReceived(String)

在包圍MessageReceived實例上提高DataConnection事件。

(繼承來源 DataConnectionSupport)
RaiseStateChanged(DataConnectionState, DataConnectionState)

在包圍 DataConnection 實例中提出狀態變更事件。

(繼承來源 DataConnectionSupport)
RollbackTransaction()

回滾或作廢交易,並回傳新的當前交易層級。

事件

名稱 Description
SiteChanged

事件發生於物業變更時 Site 。

(繼承來源 ServiceProviderWithSite)

明確介面實作

名稱 Description
IObjectWithSite.GetSite(Guid, IntPtr)

使用該 IObjectWithSite.SetSite(Object) 方法取得最後的站點集合。 若無已知地點,則會拋出例外。

(繼承來源 ServiceProviderWithSite)
IObjectWithSite.SetSite(Object)

提供網站 IUnknown 指向特定物件的指標。

(繼承來源 ServiceProviderWithSite)
IServiceProvider.QueryService(Guid, Guid, IntPtr)

作為工廠,為透過 IServiceProvider 實作所暴露的服務提供服務。

(繼承來源 ServiceProvider)

擴充方法

名稱 Description
QueryService(IServiceProvider, Guid)

透過服務提供者根據其服務 GUID 暴露服務。

QueryService<TService>(IServiceProvider)

根據服務類型,服務提供者會揭露一項服務。

適用於