Skip to Content.
Sympa Menu

freetds - Re: need some help with freebcp

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: "TDS Development Group" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: need some help with freebcp
  • Date: Tue, 22 Oct 2002 20:57:15 -0400


On Tue, 22 Oct 2002 17:17:19 -0500, "Wilson, John"
<John.Wilson AT savvis.net> wrote:
>
> The comments in the freebcp man page say that freebcp does not support
> "text" data types. when the target DB is SQL Server 2000.

Hi John,

"text" there refers to the server's column's datatype. As distinguished
from int, varchar, float, etc.

> It would seem to me that freebcp should support reading in a text file
> like this:
>
>
> 50004014 10/8/2002 17:31:34 895897.0000
> 895897.0000 895897.0000 1
> 50004015 10/8/2002 17:31:34 352936.0000
> 352936.0000 352936.0000 1

Yes.

> I'm getting this response:
> ___________________________________________________________________
> $ freebcp DATUM.dbo.datum in test1.bcp -c -S RTDBASESQL -U dsm_user -P
> passnotshown -e bcp.err
> Starting copy...
>
> 0 rows copied.
> ___________________________________________________________________
> The data is not being copied into the table.
>
> I took a look at the tdsdump.txt file... it was not very helpful, but I
> may have to dig into the protocol...

Have a look at bcp.err. That should show you any rows that failed, and
why.

> I looked for an option that provided a verbose output and could not find
> one.

Verbose is on by default. It's also off by default. ;)

We emulate Sybase's utility's behavior fairly closely, I believe.

> If someone could help out, it would be appreciated. I would think if
> there was a problem with the data format it would have reported an
> error?

If you don't specify an error file, you don't get much feedback, it's
true. You *did* specify an error file (bcp.err). In it, you should find
information about every row that failed to load. If you don't, that would
be a bug.

Are you over the hump with DBD::Sybase?

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page