Microsoft KB Archive/178366

= FIX: SELECT Into Variable with NO_BROWSETABLE Fails =

Article ID: 178366

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 6.5 Service Pack 4
 * Microsoft SQL Server 6.5 Service Pack 3

-



This article was previously published under Q178366



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 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.



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: kbbug kbfix KB178366

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.