Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need help creating a Sql Stored Proc and executing it from Access

Posted on 2011-03-14
3
Medium Priority
?
419 Views
Last Modified: 2012-05-11
I have an access front end linked to some tables in a Sql Server 2005 back end.  I would like to create a stored procedure in Sql Server that appends all records from Table 1 into Table 2.  I then need to be able to execute that Stored Procedure from my Access front end.  My access front end is linked to Table 2.  I have never done this before and need some help with the sp syntax and how to call it.   Thanks.
0
Comment
Question by:snyperj
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
viscogel earned 2000 total points
ID: 35127755
0
 

Author Comment

by:snyperj
ID: 35129814
hmmm... i created two stored procedures.  One to delete all the records from my temporary table and then one to append new data into it.    I am then calling them from a pass through separate pass through queries using 'exec' and the sp name.

I can delete records from the table ok... (So I am able to "exec" from the access side...)  however whenever I try to run the sp that appends new records I get the error shown.

If I run the sp from SQL, it runs no problem and quickly.
error.jpg
0
 

Author Closing Comment

by:snyperj
ID: 35133186
worked through it... thanks for the link.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

972 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