Parameters and Stored Proc

My qestion is - I have a Stored Procedure with variables @Week and @LWeek and they (the variables) are declared (written) in the Stored Procdure in the following order:

And the name of the Stored Procedure is usp_Sales

So when I execute this Stored Procedure and input the variables as follows:
Exec usp_Sales '15', '14' means that @Week = 15 and @LWeek = 14., Correct?

Specifically I need to confirm that the order of the variable input (when executed) is based on the order of those variables in the Stored Proc. (my thoughts are that they must be). So since @Week if first in the script of the stored procedure means that the first variable input in the exec (15) is for that variable. And similarly since @LWeek is 2nd in the script in the exec that picks up the 14 which is 2nd in the exec.
Who is Participating?
Chris WalshSoftware DeveloperCommented:
Yes, by default the "actual" parameters you pass in should match the order as defined "formally" in your SP definition.  What version of FoxPro are you using and are you sure your are not using SQL Server?

SeTechAuthor Commented:
I must have hit the wrong zone cause I use SQL 2005, SQL 2008
This parameter order is valid even when calling SQL Server SP from FoxPro via sql pass-through. :-)

I would say almost every FoxPro programmer can answer questions from SQL zone but not vice versa...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.