Parametrized Pass-Through Query

accesser2003

Registered User.
Local time
Tomorrow, 02:01
Joined
Jun 2, 2007
Messages
124
I created a stored procedure called BuildAttendanceEvents_GroupByEmp
the parameters of this procedure is @LoadFrom, @LoadTo

To run this stored procedure from the MS Access, I created a pass-through query, at the Database Window. This query is connected to the same database where the stored procedure is located at. In this pass-through query, I wrote the following code to run it:

DECLARE @LoadFrom datetime, @loadTo datetime;
EXEC BuildAttendanceEvents_GroupByEmp @LoadFrom, @LoadTo;




I was expecting that this pass-through query will ask me to enter it parameters values, but it didn't ask.

Thus, how can I convert this pass-through query to a parameterized query specially if I would like to automate it??

Thanks,
 
Is the "@" needed?

I don't think that the called parameter needs to have the same name that the stored procedure uses. It is my understanding that the only requirement is that the data types be exactly the same. Have you tried just plain:

DECLARE LoadFrom datetime, loadTo datetime;
EXEC BuildAttendanceEvents_GroupByEmp LoadFrom, LoadTo;

My apologies in advance if I am in error here.
 
What you said is not correct. HowEver, thanks for reply.
 

Users who are viewing this thread

Back
Top Bottom