此頁沒有內容條目
內容

Index 對象

         

表示數(shù)據(jù)庫表的索引。

objtable

parchildcolindexparacrosobjindex

spacespacespacespacespacespacespacespaceparmultcolcolum

spacespacespacespacespacespacespacespaceparchildcolprope

說明

如下代碼創(chuàng)建新的 Index

Dim obj As New Index

使用 Index 對象的屬性和集合,可以:

?使用 Name 屬性標識索引。

 

?使用 Columns 集合訪問索引的數(shù)據(jù)庫列。

 

?使用 Unique 屬性指定索引關鍵字是否必須唯一。

 

?使用 PrimaryKey 屬性指定索引是否為表的主關鍵字。

 

?使用 IndexNulls 屬性指定索引字段中有 Null 值的記錄是否有索引項目。

 

?使用 Clustered 屬性指定索引是否分簇。

 

?使用 ParentCatalog 屬性指定擁有索引的 Catalog。

 

?使用 Properties 集合訪問特定提供者的索引屬性。

注意   如果在已追加到 Tables 集合的 Table 對象中不存在 Column,則會在將 Column 追加到 Index Columns 集合時出現(xiàn)錯誤。