Article ID: 318171 - View products that this article applies to.
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 the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/301511/EN-US/ )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:
0x00426f59 Module(sqlservr+26f59) (CSsStr::LConvertToStr+4c) 0x00427278 Module(sqlservr+27278) (CXVariant::ConvertToStr+429) 0x0041b589 Module(sqlservr+1b589) (CXVariant::ConvertToTi+2a2) 0x005327e6 Module(sqlservr+1327e6) (CParamExchange::ExtractOutParams+d4 0x00518c8c Module(sqlservr+118c8c) (CStmtExec::XretLocalExec+177) 0x00518afa Module(sqlservr+118afa) (CStmtExec::XretExecute+253) 0x004145f1 Module(sqlservr+145f1) (CMsqlExecContext::ExecuteStmts+11a) 0x0041409f Module(sqlservr+1409f) (CMsqlExecContext::Execute+16a)
Contact us for more help