Share via


Api.JetCreateIndex2 方法

在 ESE 資料庫中建立資料的索引。

Namespace:Microsoft.Isam.Esent.Interop
裝配: Microsoft.Isam.Esent.Interop (in Microsoft.Isam.Esent.Interop.dll)

語法

'Declaration
Public Shared Sub JetCreateIndex2 ( _
    sesid As JET_SESID, _
    tableid As JET_TABLEID, _
    indexcreates As JET_INDEXCREATE(), _
    numIndexCreates As Integer _
)
'Usage
Dim sesid As JET_SESID
Dim tableid As JET_TABLEID
Dim indexcreates As JET_INDEXCREATE()
Dim numIndexCreates As IntegerApi.JetCreateIndex2(sesid, tableid, _
    indexcreates, numIndexCreates)
public static void JetCreateIndex2(
    JET_SESID sesid,
    JET_TABLEID tableid,
    JET_INDEXCREATE[] indexcreates,
    int numIndexCreates
)

參數

  • indexcreates
    類型: []

    物件的陣列,描述要建立的索引。

  • numIndexCreates
    類型: System.Int32

    索引描述物件的數目。

備註

(建立多個索引時,也就是使用 numIndexCreates 大於 1) 此方法必須在任何交易之外呼叫,而且具有資料表的獨佔存取權。 「JetCreateTable」 所傳回的JET_TABLEID將具有外泄存取權,或透過將 DenyRead 傳遞至 JetOpenTable (JET_SESID、JET_DBID、String、[]、Int32、OpenTableGrbit JET_TABLEID) ,即可開啟資料表以進行獨佔存取。

另請參閱

參考

Api 類別

Api 成員

Microsoft.Isam.Esent.Interop 命名空間