473,387 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Procedure in Access

I have the following procedure that works great when I run it from SQL
Server Manager.

EXEC prGetReferrerPayroll @startdate, @enddate, @totalsignups,
@totalopts.

All I do is replace the variables with actual dates...

EXEC prGetReferrerPayroll '02/01/2007 12:00 AM', '02/14/2007 11:59
PM', '01/01/2007 12:00 AM', '01/01/2007 12:00 AM'

In Access, I have created a link to the SQL db and can run a number of
queries, etc. However, I just cannot figure out how to run this
procedure.

I've tried making it:

PROCEDURE prGetReferrerPayroll '02/01/2007 12:00 AM', '02/14/2007
11:59 PM', '01/01/2007 12:00 AM', '01/01/2007 12:00 AM'

But then tells me "Syntax Error in Parameter Clause."

Any help is greatly appreciated!

Feb 24 '07 #1
1 4762
On Feb 24, 12:09 pm, "Andrew Tatum" <andrew.ta...@gmail.comwrote:
I have the following procedure that works great when I run it from SQL
Server Manager.

EXEC prGetReferrerPayroll @startdate, @enddate, @totalsignups,
@totalopts.

All I do is replace the variables with actual dates...

EXEC prGetReferrerPayroll '02/01/2007 12:00 AM', '02/14/2007 11:59
PM', '01/01/2007 12:00 AM', '01/01/2007 12:00 AM'

In Access, I have created a link to the SQL db and can run a number of
queries, etc. However, I just cannot figure out how to run this
procedure.

I've tried making it:

PROCEDURE prGetReferrerPayroll '02/01/2007 12:00 AM', '02/14/2007
11:59 PM', '01/01/2007 12:00 AM', '01/01/2007 12:00 AM'

But then tells me "Syntax Error in Parameter Clause."

Any help is greatly appreciated!
You can run the stored procedure in Access by creating a Pass-Through
Query. The SQL command will be just the same as on the SQL server,
i.e.,

EXEC whatever

In the query properties dialog, adjust the "ODBC Connect Str" to
reflect the DSN for your SQL Server connection (including username and
password as required), and ensure that the "Returns Records" property
is set to "Yes". Then you can use the pass-through query much like you
would any other query in Access.

Feb 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: 8leggeddj | last post by:
Hello, I am having a problem when using access xp as a frontend for sql server 2000. I have been trying to update a number of stored procedures (Just simple adding fields etc) which results in...
1
by: - | last post by:
this is one way of creating a stored procedure in mysql: CREATE PROCEDURE some_procedure (IN value1, OUT value2) BEGIN SELECT ... INTO value2 FROM .... END// and if called from another...
1
by: Mark Dicken | last post by:
Hi All I have found the following Microsoft Technet 'Q' Article :- Q210368 -ACC2000: How to Pass an Array as an Argument to a Procedure (I've also copied and pasted the whole contents into...
2
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. ...
8
by: dixie | last post by:
I want to run an event when I press the Ctl key simultaneously with the K key. How do I achieve this in VBA? dixie
8
by: Mark Flippin | last post by:
This is for a reporting problem using: Access 2000 SQL Server 2000 Both at SP3 I've a stored procedure in SQL Server 2000 which builds a result set from a disparate set of tables, utilizing...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
6
by: Peter Neumaier | last post by:
Hi, I am trying to select some data through a stored procedure and would like to store the result in a local access table. Is that possible? Can somebody provide an example? Thanks&regards!...
13
by: Neil | last post by:
Can I get the name of a procedure from within the procedure? In my error handler, I write the error to an error table. I'd like to write the name of the procedure that's writing the error. But,...
2
by: acw | last post by:
On a SQL Server 2000 db I would like to setup a stored procedure that accesses couple tables and runs the extended stored procedure xp..cmdshell. The goal is to grant users with limited privileges...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.