Error 10008 (DB-Library)

DB-Library Severity Level 9

Message Text

Bad token from SQL Server: Datastream processing out of synchronization.

Explanation

This error occurs when DB-Library cannot interpret the tabular data stream (TDS) sent from SQL Server. A DB-Library application communicates with SQL Server across the network using a TDS. The TDS is a specification for the communication of data and other messages between SQL Server and the DB-Library client. The network libraries used by SQL Server and the DB-Library client provide the interface for the transmission of TDS over a particular network protocol. The network protocol used is independent from the TDS as long as there is an appropriate interface network library that supports the network protocol, whether it is a named pipe connection or a socket connection. Each DB-Library application automatically parses this TDS to extract useful information (for example, query results rows), or to generate requests of or responses to SQL Server in a format that is mutually understood.

There are two main causes for this error:

Action

Inspect the Windows NT Event Viewer system and application logs. These logs may provide information that indicates whether the problem is related to the server network protocol, the network card, or the system configuration. Review the SQL Server-specific entries in the application log or the SQL Server error log for relevant network-related errors that correspond in time with the occurrence of the 10008 error seen on the client. If this review does not provide enough information to resolve the problem, special network monitoring tools and a review of the client's configuration may be necessary.

If the problem persists, contact your primary network support provider for assistance.

Programmers using the SQL Server Programmer's Toolkit (for DB-Library) can handle error 10008 by adding conditional statements to test for the occurrence of this error. When error 10008 is seen in the DB-Library error handler, additional processing can include closing the current DBPROCESS connection, opening a new connection, and then resending the query. For details, see Microsoft SQL Server Programming DB-Library for C and Microsoft SQL Server Programming DB-Library for Visual Basic.