How Rename a Table in SQL Statment that Contain Data?

G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top