Skip to Content.
Sympa Menu

freetds - RE: [freetds] bcp bug with null dates

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] bcp bug with null dates
  • Date: Mon, 3 Mar 2003 13:44:04 -0500

> From: Carl Johnson [mailto:CJohnson AT Acadian-Asset.com]
> Sent: March 3, 2003 12:23 PM
>
> If you use freebcp to copy data out of a datetime or
> smalldatetime field
> with a null value, the output file contains "1900-01-01 00:00:00.000"
> instead of nothing for this field.

Thank you for noticing this.

> it looks like the problem is in dblib/bcp.c:683
...
> Shouldn't there be a check to see if bcpcol->data_size == 0 before the
> datecrack?

Yes that's the problem. I committed a fix to the main branch. You may wish
to apply the attached patch.

> This is my first post to the group....

Welcome to the project, Carl.

--jkl


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.




Attachment: bcp.diff
Description: Binary data




Archive powered by MHonArc 2.6.24.

Top of Page