Table 物件 (ADOX)
表示資料庫數據表,包括數據行、索引和索引鍵。
言論
下列程式代碼會建立新的 Table:
Dim obj As New Table
使用 Table 物件的屬性和集合,您可以:
使用 Name 屬性 (ADOX) 屬性來識別資料表。
使用 Type 屬性 (Table) (ADOX) 屬性來判斷數據表的類型。
使用 Columns 集合 (ADOX) 集合存取數據表的資料庫數據行。
使用 Indexes Collection (ADOX)存取數據表的索引。
使用 ParentCatalog 屬性 (ADOX) 屬性指定擁有數據表的 Catalog。
使用 DateCreated 屬性 (ADOX) 和 DateModified 屬性 (ADOX) 屬性傳回日期資訊。
使用 Properties 集合 (ADO) 集合存取提供者特定的數據表屬性。
注意
您的數據提供者可能不支援 table 物件 的所有屬性。 如果您已為提供者不支援的屬性設定值,就會發生錯誤。 對於新的 Table 物件,當物件附加至集合時,就會發生錯誤。 針對現有的物件,設定 屬性時會發生錯誤。
建立 Table 物件時,選擇性屬性的適當預設值並不保證您的提供者支援 屬性。 如需提供者支援哪些屬性的詳細資訊,請參閱您的提供者檔。
本節包含下列主題。
另請參閱
目錄 ActiveConnection 屬性範例 (VB)
數據行和數據表 Append 方法、Name 屬性範例 (VB)
Connection Close 方法、數據表類型屬性範例 (VB)
鍵 Append 方法、索引鍵類型、RelatedColumn、RelatedTable 和 UpdateRule 屬性範例 (VB)
ParentCatalog 屬性範例 (VB)
Columns 集合 (ADOX)
Indexes 集合 (ADOX)
索引鍵集合 (ADOX)
Properties 集合 (ADO)
Tables 集合 (ADOX)