Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Executing SQL PROCEDURE USING Microsoft Access 2010.

Posted on 2013-05-25
Medium Priority
Last Modified: 2016-04-01
Is there you can execute SQL Store Proc sp_rename function from Microsoft Access ?

If so, then can anyone provide a simple snippet of what the syntax would look like.
Question by:ldcray
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 75

Accepted Solution

Anthony Perkins earned 1000 total points
ID: 39197206
What object are you trying to rename?  From MS Access you can use some ADO code to execute the sp_rename system Stored Procedure.
LVL 14

Expert Comment

by:Bill Ross
ID: 39197646

Create a new query...

Do not add any tables.

Select Pass-Through as query type in Design Tools.

Make the query text:

EXEC sp_YourSPName;

Open Properties wide.

Set ODBC Connect String to:

ODBC;Driver={SQL Server Native Client 10.0};Server=YourSQLServer;DATABASE=YourDatabasName;Trusted_Connection=True"

Save as SPPassThru and run the query as needed.

Note:  You can build a connection string using the ODBC wizard and/or you can modify the string per:




Author Comment

ID: 39197766
I'm trying to rename table objects on a SQL 2008 R2 database.
LVL 14

Assisted Solution

by:Bill Ross
Bill Ross earned 1000 total points
ID: 39197806

Change the EXEC line above:

EXEC sp_YourSPName;

EXEC sp_rename 'YourExistingTableName', 'YourNewTableName';



Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question