BCP Fails to Parse Format File If It Has White Space in Column Name

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steve D?sy (sdesy_at_paradox.ca)
Date: 03/10/04


Date: 10 Mar 2004 06:24:38 -0800

Microsoft acknowledge that there's a problem when BCP parse a format
file that as white space in column name. There workaround is to
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).

This is my format file.

8.0
21
1 SQLINT 1 4 "\t" 1
Default ID ""
2 SQLNCHAR 2 100 "\t" 2
0 SQL_Latin1_General_CP1_CI_AS
3 SQLNCHAR 2 100 "\t" 3
1 SQL_Latin1_General_CP1_CI_AS
4 SQLNCHAR 2 100 "\t" 4
2 SQL_Latin1_General_CP1_CI_AS
5 SQLNCHAR 2 100 "\t" 5
3 SQL_Latin1_General_CP1_CI_AS
6 SQLNCHAR 2 100 "\t" 6
4 SQL_Latin1_General_CP1_CI_AS
7 SQLNCHAR 2 100 "\t" 7
5 SQL_Latin1_General_CP1_CI_AS
8 SQLNCHAR 2 100 "\t" 8
6 SQL_Latin1_General_CP1_CI_AS
9 SQLNCHAR 2 100 "\t" 9
7 SQL_Latin1_General_CP1_CI_AS
10 SQLNCHAR 2 100 "\t" 10
8 SQL_Latin1_General_CP1_CI_AS
11 SQLNCHAR 2 100 "\t" 11
9 SQL_Latin1_General_CP1_CI_AS
12 SQLNCHAR 2 100 "\t" 12
10 SQL_Latin1_General_CP1_CI_AS
13 SQLNCHAR 2 100 "\t" 13
11 SQL_Latin1_General_CP1_CI_AS
14 SQLNCHAR 2 100 "\t" 14
12 SQL_Latin1_General_CP1_CI_AS
15 SQLNCHAR 2 100 "\t" 15
13 SQL_Latin1_General_CP1_CI_AS
16 SQLNCHAR 2 100 "\t" 16
14 SQL_Latin1_General_CP1_CI_AS
17 SQLNCHAR 2 100 "\t" 17
15 SQL_Latin1_General_CP1_CI_AS
18 SQLNCHAR 2 100 "\t" 18
16 SQL_Latin1_General_CP1_CI_AS
19 SQLNCHAR 2 100 "\t" 19
17 SQL_Latin1_General_CP1_CI_AS
20 SQLNCHAR 2 100 "\t" 20
18 SQL_Latin1_General_CP1_CI_AS
21 SQLNCHAR 2 100 "\r\n" 21
19 SQL_Latin1_General_CP1_CI_AS

Does anyone as a solution?

Thanks

Steve



Relevant Pages

  • Re: HOW this program is executing plz explain the program
    ... white space looking for the start of the integer. ... C99 7.19.6.2p2 (describing fscanf, but the same applies to scanf): ... If there are insufficient arguments for the format, ...
    (comp.lang.c)
  • Re: spaces in scanf format string
    ... scanf's format string. ... "%d" skips the tab and consumes and converts the 34. ... this doesn't mean that white space in the format ...
    (comp.lang.c)
  • Re: Ambiguous/debatable errata
    ... In any draft of the C99 standard, ... white space in formats; if white space occurs at a place in the format, ... "The format string may contain: ... Blanks or tabs, which are ignored". ...
    (comp.lang.c)
  • Re: Ambiguous/debatable errata
    ... white space in formats; if white space occurs at a place in the format, ... "The format string may contain: ... Blanks or tabs, which are ignored". ... or until no more characters can be read. ...
    (comp.lang.c)
  • Re: What is the format/structure of UPN string?
    ... I have never seen a definition but I would expect it matches the email address format since that is what it was meant to ... White space is obviously not allowed in an email address and I wouldn't expect it would be allowed in a UPN as ... > for example two tabs and a del as my UPN-suffix? ...
    (microsoft.public.platformsdk.security)