BUG: SELECT Into Variable with NO_BROWSETABLE Fails

Last reviewed: February 2, 1998
Article ID: Q178366
The information in this article applies to:
  • Microsoft SQL Server, version 6.5 Service Pack 3 and Service Pack 4
BUG #: NT: 17676 (6.5)

SYMPTOMS

If NO_BROWSETABLE is set ON, selecting data into a variable from a table with a timestamp column fails with the following message:

   DB-Library: Possible network error: Bad token from SQL Server:
   Datastream processing out of sync.
   Net-Library error 0:

   DB-Library Process Dead - Connection Broken

A sample script that demonstrates the problem is provided in the MORE INFORMATION section of this article.

WORKAROUND

To work around this problem, remove the timestamp column from the table.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5 Service Pack 3 and Service Pack 4. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

This problem does not occur on builds of SQL Server earlier than 6.50.258 (Service Pack 3). This problem has been tested and reproduced on SQL Server build 6.50.281 (Service Pack 4).

SET NO_BROWSETABLE ON is an undocumented option performed for Remote Data Service (RDS) ActiveX Data Connector (ADC) connections to SQL Server. Enabling this option makes every SELECT statement act as though FOR BROWSE had been appended to the statement, but bypasses the temporary table that FOR BROWSE normally pipes the results through. The net effect is to add keys and timestamps to the query as hidden output columns so the client can update specific rows (updateable cursors) without separate trips to the server to pick up the meta-data and munging the query to get the appropriate columns.

The following script demonstrates the problem:

   set nocount on
   go
   use pubs
   go
   DROP TABLE test_unknown_token1
   go
   CREATE TABLE test_unknown_token1 (
      col1 char(1),
      timestamp timestamp
   )
   go

   insert test_unknown_token1 (col1) values ('1')
   go

   set no_browsetable on
   go
   declare @ochrStatus char(1)

   SELECT @ochrStatus = col1
   FROM dbo.test_unknown_token1
   WHERE col1='1'


Additional query words: sp sp3 sp4 temp
Keywords : kbbug6.50.sp3 SSrvProg
Version : WINNT:6.5 SP3 SP4
Platform : winnt
Issue type : kbbug
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.