Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

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
0
lirong
Asked:
lirong
  • 2
  • 2
1 Solution
 
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
 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now