Skip to Content.
Sympa Menu

freetds - RE: [freetds] freebcp problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Weible, Jason" <jasonm.weible AT nextiraone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] freebcp problem
  • Date: Fri, 8 Apr 2005 07:22:57 -0500

Is there a return on the second line of the data file or not? I've had
problems similar to this when it is expecting a \n at the end of the line and
don't receive it and vise versa. If there isn't one and it's looking for one
to denote the end of a record, I can see why you would get an EOF error.

Just an idea.

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org]On Behalf Of Thompson, Bill D
(London)
Sent: Friday, April 08, 2005 2:57 AM
To: TDS Development Group
Subject: [freetds] freebcp problem


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




  • [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.

Top of Page