We have found that if you have input parameters and those parameters are used in the query that this is at least one cause of the problem. Not sure why this is but we have found a work around.
If you create local variables and then assign those local variables the value of the parameter that you passed in this problem goes away for the affected stored procedures.
Instead of:
CREATE procedure test_query
(
@input_param as varchar(10)
)
AS
BEGIN
SELECT * from test_table where test_field = @input_param
END
You can code:
CREATE procedure test_query
(
@input_param as varchar(10)
)
AS
BEGIN
DECLARE @local_input_param as varchar(10)
SET @local_input_param = @input_param
SELECT * from test_table where test_field = @local_input_param
END
No comments:
Post a Comment