By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,482 Members | 2,411 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,482 IT Pros & Developers. It's quick & easy.

Procedure in Access

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.