Executing SQL PROCEDURE USING Microsoft Access 2010.

Posted on 2013-05-25
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
  • 2
LVL 75

Accepted Solution

Anthony Perkins earned 250 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 250 total points
ID: 39197806

Change the EXEC line above:

EXEC sp_YourSPName;

EXEC sp_rename 'YourExistingTableName', 'YourNewTableName';



Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

828 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