The information in this article applies to:
BUG#: 12488 (6.00 DocErr) SYMPTOMSThe SQL Server 6.0 "Transact-SQL Reference" manual under the section "Using EXECUTE with a Character String" (page177) has an invalid example for using EXEC() to change the database context. This use of EXEC() should not be allowed and is considered a bug for SQL 6.0. Future versions of SQL Server 6.0 will revert the database context to its original state after completion of the EXEC statement. Therefore, any scripts or applications that rely on the current behavior will not work for future versions of SQL Server. STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server version 6.0. For more information, contact your primary support provider. MORE INFORMATION
The example as listed in the documentation:
will fail with the following error:
in future versions of SQL Server (assuming a table called authors does not exist in the current database). Any change in database context for EXEC is only valid within that EXEC statement. Therefore, the following example will work properly on SQL 6.0 and future versions:
Additional query words: sql6 docs
Keywords : SSrvDoc_Err kbbug6.00 kbfix6.00.sp3 |
Last Reviewed: March 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |