共用方式為


OdbcFactory.Instance 欄位

定義

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

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

欄位值

範例

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

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

適用於