Skip to Content.
Sympa Menu

freetds - Re: [freetds] freebcp out from MS SQL Server drops spaces [NC]

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Cedric ROUVRAIS <cedric.rouvrais AT sgcib.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] freebcp out from MS SQL Server drops spaces [NC]
  • Date: Fri, 10 Jul 2009 09:12:38 -0400

Hi Fred,

I changed the code where James suggested I change the code.

As it isn't my code, I followed his suggestion :o)

The important part is the behaviour, the location of no importance to me.

A++ Cedric
--------------------------
Sent with a mobile device.


----- Original Message -----
From: Frediano Ziglio [freddy77 AT gmail.com]
Sent: 07/10/2009 07:21 AM ZE2
To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
Subject: Re: [freetds] freebcp out from MS SQL Server drops spaces [NC]



Il giorno gio, 09/07/2009 alle 17.08 -0400, James K. Lowden ha scritto:
> Cedric ROUVRAIS wrote:
> > > Since freebcp supports the -b batchsize option, should the
> > > rows_written be compared to the const 1000 or to pdata->batchsize ?
> >
> > Sybase BCP does not take into consideration the batch size for printing
> > to stdout progress. In other words no matter what value you put for the
> > -b option, it will always send to stdout every 1000 rows the message
> > "x000 rows successfully bulk-copied to host-file.".
>
> I have always found that to be a misfeature. You extract a 1,000,000 rows
> and get 1,000 lines of "1000 rows written to host file".
>
> I prefer the symmetry of mating the value of -b to the feedback in both
> directions. On uploading, of course, -b controls the commit batch size
> (and feedback on standard output). On extraction there's no commit, so
> its only effect is to reduce the noise on the terminal.
>
> Thank you for the code. I hope to look at it this weekend unless Frediano
> beats me to it.
>

Personally I looked at bcp.c code. I think it would be better to change
len passed to dbconvert in order to avoid trimming. We use a len -1 or
-2 so dbconvert trim but passing a specific len cause dbconvert not to
trim!

Frediano


_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds

*************************************************************************
This message and any attachments (the "message") are confidential, intended
solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible
to alteration. Neither SOCIETE GENERALE nor any of its subsidiaries or
affiliates shall be liable for the message if altered, changed or falsified.
*************************************************************************



Archive powered by MHonArc 2.6.24.

Top of Page