Microsoft KB Archive/101607

{|
 * width="100%"|

The information in this article applies to:
 * Microsoft SQL Server Programmer's Toolkit, version 4.2

BUG# 8939 (4.2a)

SYMPTOMS
BCP fails to load data into SQL Server when attempting to load data files including long text fields and a format file specifying the length of the text data to be greater than 255 bytes. Versions of BCP 4.2a and later fail without generating an error message. BCP 4.2 fails to load data and generate a "bcp_readfmt failed" error. BCP version 1.11 loads the data, but the following error message appears:

operating system error: (null) DB-Lib error I/O Error while reading bcp data file

CAUSE
The BCP utility does not handle format files specifying data field lengths of greater than 255 characters correctly.

WORKAROUND
A character mode bulk insert using appropriate field delimiters allows the data to be loaded using the BCP.EXE utility.

STATUS
Microsoft has confirmed this to be a problem in BCP versions 4.2 and 4.2a. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
 * }

-

Last reviewed: May 5, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.