IDataEnvironment 介面

定義

定義一個與資料服務的介面,使控制設計者能將資料儲存或資料庫相關功能整合進設計環境中。

public interface class IDataEnvironment
public interface IDataEnvironment
type IDataEnvironment = interface
Public Interface IDataEnvironment

備註

實作介面 IDataEnvironment 的物件可以在設計時存取應用程式可用的資料連線。 介面 IDataEnvironment 提供列出可用資料連接、建立新資料連線、從連線擷取結構資訊,以及將資料連線設定資訊儲存到應用程式的設定檔的方法。

這個 IDataEnvironment 介面讓你能在設計環境中與資料連線互動,但它並非設計成資料管理 API。

屬性

名稱 Description
Connections

取得目前設計會議中定義的資料連線集合。

方法

名稱 Description
BuildConnection(IWin32Window, DesignerDataConnection)

透過設計工具的新連線使用者介面建立新的資料連線或編輯現有連線。

BuildQuery(IWin32Window, DesignerDataConnection, QueryBuilderMode, String)

會啟動一個對話框來建立 SQL 查詢字串。

ConfigureConnection(IWin32Window, DesignerDataConnection, String)

會將一個 連接字串 寫入應用程式的設定檔。

GetCodeExpression(DesignerDataConnection)

回傳一個包含從應用程式設定檔擷取 連接字串 所需的原始碼的程式碼表達式。

GetConnectionSchema(DesignerDataConnection)

取得指定資料連線的結構。

GetDesignTimeConnection(DesignerDataConnection)

獲得一個可在設計時使用的資料庫連線。

適用於