Microsoft KB Archive/104784

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:13, 12 August 2020 by X010 (talk | contribs) (X010 moved page Microsoft KB Archive/Q104784 to Microsoft KB Archive/104784 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FIX: SELECT Local Variable with FOR BROWSE Drops Connection

PSS ID Number: Q104784 Article last modified on 10-31-1994

4.20 | 4.20


The information in this article applies to:
- Microsoft SQL Server version 4.2 for OS/2 - Microsoft SQL Server version 4.2

BUG# OS/2: 1705 (4.2) NT: 272 (4.2)


A SELECT with an assignment to a local variable in the SELECT clause and a FOR BROWSE clause may trap the server or disconnect the user’s connection with an error:

10008 Bad Token

This only happens when a unique index exists on the table being selected from.

For example: DECLARE @ordnum int SELECT @ordnum = OrderNumber FROM SaleOrder WHERE OrderNumber = 1 FOR BROWSE


Do not use the FOR BROWSE clause in a Transact SQL statement when values are being selected into local variables. The FOR BROWSE clause is designed to be used with DB-Library applications, and is not designed to be used in cases like this.


Microsoft has confirmed this to be a problem in SQL Server version 4.2 for OS/2 and Microsoft SQL Server version 4.2. This problem was corrected in SQL Server version 4.2aK11 for OS/2. For more information, contact your primary support provider.

Additional reference words: 4.20 4.20a Transact SQL T-SQL KBCategory: kbprg KBSubcategory: SSrvServer SSrvWinNT


Copyright Microsoft Corporation 1994.