Rename a SQL Server Table from my Access code

schmir1 used Ask the Experts™
How would I go about renaming a table that is on a SQL Server from my VBA code running in Access 2007.

For example:
I want to rename the table "Commitment_Outlook_new" to "Commitment_Outlook"
Note: I DO NOT want to rename the link to the table but the actual table on SQL Server.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Create a passthrough query and EXEC sp_rename 'fromtablename', 'totablename'; in the passthrough.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial