删除视图范例

目录

如下代码说明如何使用 Delete 方法从目录中删除视图。

Sub DeleteView()   Dim cat As New ADOX.Catalog   ' 打开目录
   cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
      "Data Source=c:\Program Files\Microsoft Office\" & _
      "Office\Samples\Northwind.mdb;"   '删除视图
   cat.Views.Delete "AllCustomers"End Sub
www.holmesian.org