共用方式為


OleDbFactory.Instance 欄位

定義

取得 OleDbFactory 的執行個體。 這可以用來擷取強型別的資料物件。

public: static initonly System::Data::OleDb::OleDbFactory ^ Instance;
public static readonly System.Data.OleDb.OleDbFactory Instance;
 staticval mutable Instance : System.Data.OleDb.OleDbFactory
Public Shared ReadOnly Instance As OleDbFactory 

欄位值

範例

下列代碼段會 Instance 使用 字段來擷取 OleDbFactory 實例,然後傳回強型別 DbCommand 實例:

Dim newFactory As OleDbFactory = OleDbFactory.Instance
Dim cmd As DbCommand = newFactory.CreateCommand()
OleDbFactory newFactory = OleDbFactory.Instance;
DbCommand cmd = newFactory.CreateCommand();

適用於