Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-14
3
Medium Priority
?
414 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
[X]
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
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

715 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