Renaming a table

Hello

Is there a possibility to rename a table, using the DAO objects ?

Or, is there another possibility ?

Waiting for your answer soon,

Thanks,

Golan Liron
lirongAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
If you are inside an Access Module,
then do the following code:
Application.CurrentDb.TableDefs("Table1").Name = "Table2"

0
 
AzraSoundCommented:
do you mean permanently?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
What database are you speaking of?
If you have SQL Server, yes.
You execute the stored procedure using the DAO Connection object
EXEC sp_rename 'oldname', 'newname'
0
 
lirongAuthor Commented:
Adjusted points from 15 to 30
0
 
lirongAuthor Commented:
I don't understand.

I'm working with Access, and using the recordset, database and workspace objects.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.