This article was previously published under Q318171
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 100768 (SQLBUG_70)
If you bind a Transact-SQL local variable to more than one OUTPUT parameter for a stored procedure, the execution of the batch that includes the variable and stored procedure may fail with an access violation or may lead to an access violation for other SQL Server threads.
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 7.0. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
301511 INF: How to Obtain the Latest SQL Server 7.0 Service Pack
To work around this behavior, bind a local variable to only one unique OUTPUT parameter for a stored procedure execution.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft SQL Server 7.0 Service Pack 4.
The following Transact-SQL batch demonstrates an example of this problem:
An access violation may not occur with this general example. However, any batch and stored procedure execution that you develop in this fashion is subject to a possible access violation. Additionally, it may cause unpredictable problems in SQL Server that can lead to an access violation for other SQL Server threads.
There is no unique stack dump signature that you will see if an access violation occurs because of this problem. However, for reference, the following stack dump is an example of one you may see: