How to rename a Access Table using ADOX

How to rename a Access Table using ADOX

Post by David A. Wrigh » Fri, 10 Nov 2000 04:00:00



Hi.

I am trying to rename MSAccess tables using ADOX from VB.

I have tried the following but it fails. Any Suggestions?

    Dim cat As New ADOX.Catalog
    Dim tbl As New ADOX.Table

    'Open the Catelog cat.ActiveConnection =
"Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data
Source=C:\Directory\MSaccessFile.mdb"

    Set tbl = cat.Tables("Old_Name")
    tbl.Name = "New_Name"

    Set cat = Nothing