Skip to Content.
Sympa Menu

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

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Pothen, Abi" <APothen AT nb.com>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] freebcp bulk load wont work with -f option
  • Date: Wed, 28 May 2003 10:51:41 -0400

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
defaults.

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
)

test.dat
--------
100 TESTSCORE1 99.90
120 TESTSCORE2 98.40
130 TESTSCORE3 97.20
140 TESTSCORE4 96.10

test.fmt
--------

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


test_1.fmt
----------

7.0
3
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
password

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

Native bcp supports both the above cases without any problem.

Can anyone please suggest any workarounds ?


Thanks.


-----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



Hi,

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 (
https://lists.ibiblio.org/sympa/arc/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.
Abi.


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
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




Archive powered by MHonArc 2.6.24.

Top of Page