Are the following two blocks of psuedo-code the same, or will one pass information to the sproc differently.
Case 1
Define Sql Parameter 1 in array as @Param1
Define Sql Parameter 2 in array as @Param2
Define Sql Parameter 3 in array as @Param3
SqlHelper(con, "sproc", ParameterArray)
And
Case 2
Define Sql Parameter 1 in array as @Param2
Define Sql Parameter 2 in array as @Param1
Define Sql Parameter 3 in array as @Param3
SqlHelper(con, "sproc", ParameterArray)
The sproc is like this
CREATE Procedure dbo.sproc
(
@Param1 int,
@Param2 int,
@Param3 int
)
Logic would dictate that Parameter 1 in case 1 would map to @Param1 because it is named such, and Parameter 2 in case 2 would map to @Param1 because it is named so... However, when I pass the values in, in both these cases the order that the parameter is defined MUST match the order of the parameters in the sproc definition! Is this the case or am I doing something wrong?
Best Regards,
Akusei
Case 1
Define Sql Parameter 1 in array as @Param1
Define Sql Parameter 2 in array as @Param2
Define Sql Parameter 3 in array as @Param3
SqlHelper(con, "sproc", ParameterArray)
And
Case 2
Define Sql Parameter 1 in array as @Param2
Define Sql Parameter 2 in array as @Param1
Define Sql Parameter 3 in array as @Param3
SqlHelper(con, "sproc", ParameterArray)
The sproc is like this
CREATE Procedure dbo.sproc
(
@Param1 int,
@Param2 int,
@Param3 int
)
Logic would dictate that Parameter 1 in case 1 would map to @Param1 because it is named such, and Parameter 2 in case 2 would map to @Param1 because it is named so... However, when I pass the values in, in both these cases the order that the parameter is defined MUST match the order of the parameters in the sproc definition! Is this the case or am I doing something wrong?
Best Regards,
Akusei