This article was previously published under Q288185
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 101265 (SQLBUG_70)
A stored procedure that accepts a parameter, which is used to determine how many columns to add to a temporary table that the stored procedure creates, might continue to use the value of the parameter passed the first time the procedure was executed, even though different values are passed for subsequent executions.
Create the procedure using a WITH RECOMPILE clause.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack SP3 for Microsoft SQL Server 7.0. For information about how to download and install the latest SQL Server Service Pack, see the following Microsoft Web site: