ID Number: Q73215
1.10 | 1.10
MS-DOS | OS/2
Summary:
SYMPTOMS
When running a DB-LIBRARY (dblib) application, the following error
message is received:
Error 10008, "Bad token from SQL Server: Datastream processing
out of sync."
CAUSE
A dblib application communicates with a SQL Server across the
network using a tabular datastream (TDS). This TDS is transmitted
across a named pipe, which is provided and maintained by the
network operating system. Each dblib application automatically
parses this TDS to extract useful information (for example, query
result rows).
When dblib cannot interpret the TDS, it generates a 10008 error,
"Bad token from SQL Server: Datastream processing out of sync."
There can be two causes for this error:
1. The first possible cause is that the data coming across the
network named pipe has been corrupted. This is always caused by
some kind of network problem involving either network hardware
or software.
2. The second possible cause is that the network has sent a message
across the named pipe. For example, in LAN Manager version 2.0
if the numreqbuf value in the [server] section of LANMAN.INI is
too low, the number of named pipes that can be open at one time
will be limited. When this occurs, LAN Manager sends an error
across the named pipe; dblib does not understand the error and
generates a 10008 error.
RESOLUTION
Check for possible network problems, or run network diagnostics.
Remember that the problem can involve any of the networking
hardware or software, on the server and/or on the client.
For more information on the second problem and how to increase the
numreqbuf value, query on the following words:
configuring and LAN Manager and Peer Service and SQL Server
When writing a dblib application, the 10008 error can be gracefully
handled by having the error handler of the dblib application trap
the 10008 error. After receiving it, you can close the DBPROCESS
connection, open a new one, then resend the query.