freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
- To: "TDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: [freetds] freebcp problem
- Date: Fri, 8 Apr 2005 08:57:29 +0100
Guys,
I've just found a problem with freebcp. I'm not sure if this known about
or not.
I created a table :
create table bill_bcp_nvarchar (col1 int not null, col2 nvarchar(50) not
null )
and tried to load in a datafile :
1<tab>ABCDEFGHIJKLMNO
2<tab>123456789012345678901234567890
using freebcp:
freebcp <database>.<user>.bill_bcp_nvarchar in bill_nvarchar.txt -c -S
<server> -U <user> -P <pass>
I get "Unexpected EOF encountered in BCP data-file."
The problem appears to be with the code arounf tds_iconv_read()
the relevant section of the dump is:
08:53:25.011764 parsing host column 2
08:53:25.012605 prefix_len = 0 collen = 0
08:53:25.013235 _bcp_measure_terminated_field returned 15
08:53:25.013815 Adjusted collen is 30.
08:53:25.014439 tds_iconv_fread: read 30 of 30 bytes; outbuf has 30
left.
08:53:25.015371 tds_iconv_fread: error 7: Arg list too long.
08:53:25.015932 Data read from hostfile: collen is now 30, data_is_null
is 0
I'm guessing we're reading more data than we should for the column, but
I'm not too hot on this aspect of the code....
Is it a simple bug or are there more complex issues ?
Bill
--------------------------------------------------------
If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------
-
[freetds] freebcp problem,
Thompson, Bill D (London), 04/08/2005
- <Possible follow-up(s)>
- RE: [freetds] freebcp problem, Weible, Jason, 04/08/2005
Archive powered by MHonArc 2.6.24.