BUG: BCP Fails to Parse Format File If It Has Space in Col. NameLast reviewed: January 23, 1998Article ID: Q179657 |
The information in this article applies to:
SYMPTOMS When using the bulk copy program (BCP) to do BCP IN, BCP fails to parse a format file that was created during a BCP OUT. This problem occurs when the user responds to the prompts for each column if the source table was created with white space in the column names.
CAUSEWhen a table is created with the SET QUOTED_IDENTIFIER option turned on and the table columns have embedded white space, the column names with the embedded white space are copied to the last column (column name) of a format file by BCP. On a BCP IN, these column names are incorrectly parsed because of the white space. The following error message is returned by BCP:
DB-LIBRARY error: Incorrect host-column number found in bcp format-file.This error is generated because BCP stops parsing the column name after it encounters the first white space. BCP then interprets the next word in the column name as the beginning of the next line and expects to find a column number for the data file.
WORKAROUNDTo work around this problem, manually edit the format file to omit all white space characters from the last column in the format file (that is, characters 0x09-0x0D, 0x20).
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional query words: tbl
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |