Article ID: 259775 - View products that this article applies to.
This article was previously published under Q259775
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57545 (SQLBUG_70)
If you use Microsoft SQL Server 7.0 Service Pack 1 or Service Pack 2, and you use ISNULL as an expression that performs a divide by zero while the client has ANSI_WARNINGS set to OFF, the client disconnects. The errors that occur differ slightly depending on whether the client is ODBC, OLE DB or DB-Library-based. The ODBC and DB-Library errors follow.
[Microsoft][ODBC SQL Server Driver]Unknown token received from SQL Server
DB-Library: Possible network error: Bad token from SQL Server: Datastream processing out of sync.
Net-Library error 0: (null)
DB-Library: DBPROCESS is dead or not enabled.
Set ANSI_WARNINGS to ON, or change the expression so that it will not encounter a divide by zero error.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799For more information, contact your primary support provider.
(https://support.microsoft.com/kb/274799/ )INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For ODBC and OLE DB-based connections, ANSI_WARNINGS are set ON by default. For a DB-Library-based connection, the ANSI_WARNINGS option is set to OFF by default.
The following script demonstrates the problem:
This script should return 0.