[freetds] freebcp bulk load wont work with -f option

Pothen, Abi APothen at nb.com
Wed May 28 10:51:41 EDT 2003

Hi All,
 I can get rid of the "Unrecognized datatype found" error message by using
"SYBCHAR" instead of "SQLCHAR" in my format file.

But I am facing a different problem.

Freebcp utility has problem dealing with idenity fields and fields with

Please consider following example:

CREATE TABLE [dbo].[test] (
	[FLD_IDENT] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,  
	[FLD_VCHAR] [varchar] (15) NOT NULL ,  
	[FLD_NUM] [numeric](22, 7) NULL 

100	TESTSCORE1	99.90
120	TESTSCORE2	98.40
130	TESTSCORE3	97.20
140	TESTSCORE4	96.10

1	SYBCHAR	0	10	"\t"	0	FLD_IDENT
2	SYBCHAR	0	10	"\t"	2	FLD_VCHAR
3	SYBCHAR	0	10	"\n"	3	FLD_NUM


1	SYBCHAR	0	10	"\t"	1	FLD_IDENT
2	SYBCHAR	0	10	"\t"	2	FLD_VCHAR
3	SYBCHAR	0	10	"\n"	3	FLD_NUM

When I use test.fmt, bcp fails with "Segmentation Fault (core dumped)"
freebcp testdb.dbo.test  in test.dat -f  test.fmt -S SQLSERVER -U user -P

When I use test_1.fmt, bcp works
freebcp testdb.dbo.test  in test.dat -f  test_1.fmt -S SQLSERVER -U user -P

Native bcp supports both the above cases without any problem.

Can anyone please suggest any workarounds ?


-----Original Message-----
From: Pothen, Abi 
Sent: Tuesday, May 27, 2003 3:27 PM
To: 'FreeTDS Development Group'
Subject: [freetds] freebcp bulk load wont work with -f option 


 I have successfully installed FreeTds 0.61 in a Sun Solaris box to access
MSSQL2K on WIN2K server and I am trying to use the freebcp utility ( with -f
option) to bulk copy data into a table.

But, bcp is failing with the following error message:

   Msg 20102, Level 7
   Unrecognized datatype found in format-file.

When I searched the freetds mailing list archive, I have seen the similar
problem posted with freetds 0.60 (
http://lists.ibiblio.org/pipermail/freetds/2002q4/010205.html ) and the
suggestion was to use its latest snapshot.
I was wondering whether this problem has been fixed with the freetds 0.61
version ?

I have tried both tds versions 7.0 and 8.0.

Thanks for your help.

FreeTDS mailing list
FreeTDS at lists.ibiblio.org
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. 
E-mail transmission cannot be guaranteed to be secure or error-free. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message that arise as a result of e-mail transmission.
This message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments. 
 All e-mails at Neuberger Berman are, in accordance with Firm policy, to be
used for Neuberger Berman business purposes only. E-mails sent from or to
the Firm are subject to being reviewed by the Firm in accordance with the
Firm's procedure for the review of correspondence

More information about the FreeTDS mailing list