Renaming Access Table With ADOX

Renaming Access Table With ADOX

Post by Jo Jo » Wed, 12 Mar 2003 19:11:55



Is it possible to rename/copy access table name
using ADOX ?

Thanks
Wilen

 
 
 

Renaming Access Table With ADOX

Post by Val Mazu » Wed, 12 Mar 2003 21:48:19


Jo,

To copy table you may use SELECT INTO SQL statement, like

SELECT * INTO NewTableName FROM MyCurrentTableName

It will copy all the records, but it will not copy any indexes of primary
key information

About renaming table. You may change it setting Name property of Table in
ADOX. See next link with example

http://www.4guysfromrolla.com/webtech/tips/t030802-1.shtml

--
Val Mazur
Microsoft MVP


Quote:> Is it possible to rename/copy access table name
> using ADOX ?

> Thanks
> Wilen


 
 
 

1. How to rename a Access Table using ADOX

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

2. I'm searching good tutorials for database programming.

3. renaming a SQL Server 7 table with ADOX

4. Link local Pdoxwin 5.0 tables on-line?

5. ADOX - renaming a table

6. Checkpoints

7. adox rename table?

8. Logged Operations

9. renaming an SQL Server table with ADOX

10. HELP ADOX rename a column

11. Rename Column in Excel using ADO or ADOX

12. Using ADOX & SQLOLEDB to rename a column

13. ADOX and Access Linked Tables