FIX: Win16 DBLIB Does Not Restrict Packet Size to 512 for SPX

Last reviewed: April 8, 1997
Article ID: Q152130
The information in this article applies to:
  • Microsoft SQL Server, version 6.5

SYMPTOMS

A DB-Library application for Windows may return the following error when executing a query that returns a large number of rows under IPX/SPX:

   Possible Network Error; Read From SQL Server Failed.

   This command did not return data, and it did not return any rows
   DB-Library Process Dead - Connection Broken

When this occurs, the connection will be lost, and closing the application may cause Windows to stop responding.

CAUSE

The Win16 DB-Library DLL (W3dblib.dll or Msdblib3.dll) does not correctly detect the IPX/SPX Net-Library for Windows. As a result, it does not automatically restrict the TDS packet size to 512 bytes. This causes DB- Library to use the default "Network Packet Size" setting on the server side, which is 4096 bytes by default. Due to the architecture limit in DBMSSPX3.DLL, a larger TDS buffer size is not supported. Attempting to use a larger TDS packet size can cause unexpected errors or make the system otherwise unstable.

WORKAROUND

You can work around this problem either by forcing the packet size to 512 through the DBSETLPACKET() DBLIB function or by reducing the default "Network Packet Size" on the server side to 512 bytes.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5. This problem has been corrected in the latest U.S. Service Pack for SQL Server version 6.5. For information on obtaining the Service Pack, query on the following word in the Microsoft Knowledge Base (without the spaces):

S E R V P A C K

MORE INFORMATION

You can call the DBLIB function, DBSETLVERSION(), to enable the 6.x specific behavior for the application. This will cause the DBLIB to set the TDS packet size according to the "Network Packet Size" setting on the server side, unless you explicitly set the packet size using DBSETLPACKET(). As the default "Network Packet Size" setting is 4096, the DBLIB application will try to use 4096 as the packet size because it cannot correctly detect the SPX Net-Library used. This causes the problem.

The earlier versions of DBLIB for Windows do not set the packet size according to the server-side setting, and 512 is used by default. Therefore, you may not encounter this problem with earlier versions of DBLIB. However, if you explicitly call DBSETLPACKET() to set the packet size larger than 512 bytes, you will encounter this problem even with earlier versions of DBLIB.


Additional query words:
Keywords : kbbug6.50
Version : 6.5
Platform : WINDOWS


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: April 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.