How Rename a Table in SQL Statment that Contain Data?

E

Eng_TRIX

Hi i am in really a big problem
Does jet 4.0 don`t support Renaming a Table
if So how colud i Rename the table
note that i create that table before using SQL statment " CREATE TABLE "
 
D

Douglas J. Steele

You can use DAO or ADOX to rename it.

Using DAO, it's CurrentDb.TableDefs("OldTableName").Name = "NewTableName"
 
C

Chris2

Eng_TRIX said:
Hi i am in really a big problem
Does jet 4.0 don`t support Renaming a Table
if So how colud i Rename the table
note that i create that table before using SQL statment " CREATE
TABLE "

Eng_TRIX,

You're looking for:

ALTER TABLE <table name> RENAME TO <new table name>

As far as I know, JET 4.0 does not support it.

You must use DAO in VBA to change the name of a table
programmatically.


Sincerely,

Chris O.
 
G

Guest

Use CREATE VIEW to create a view of the
table with any name you want. Delete the view
when you you no longer need it.

(david)
 
Top