Skip to Content.
Sympa Menu

freetds - Re: [freetds] BCP In of data too large fails [NC]

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] BCP In of data too large fails [NC]
  • Date: Fri, 21 Aug 2009 15:02:58 +0100

Hi,

I saw JKL last night and he told me off for not contributing any more.
sorry!
here's my two pennorth for what it's worth...

You're right - SET ANSI_WARNINGS OFF can be used to silently ignore data
truncation issues in T-SQL, but BCP inserts data into the database at a
much lower level than T-SQL.
Effectively the BCP protocol provides the server with data that more
closely mirrors the way that the data is physically stored in the
database files themselves.
It's therefore important that the data that BCP provides to the server
doesn't break any of the rules that govern that.
Break those rules and you get database corruption!

So all possible problems with data format are errored by the bcp/dblib
layer.
You may find that the actual validation occurs within the dbconvert()
call within the function you identified.
switching on a TDSDUMP should tell you what it's up to, and where...

Hope this helps - it's been a long time!

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Cedric ROUVRAIS
Sent: 20 August 2009 23:42
To: FreeTDS Development Group
Subject: [freetds] BCP In of data too large fails [NC]


Hi guys,

The bcp in a row that contains one or more columns that have too much
data
in the file results in the line not being inserted. I have the
impression
this is done at the bcp/dblib level whereas it should be done by the
database (SET ANSI_WARNINGS OFF | ON)

Does anyone know where this is done precisly?

I am currently looking at static RETCODE _bcp_read_hostfile(DBPROCESS *
dbproc, FILE * hostfile, int *row_error)

but if some could point out the code location, it would be helpful

Thanks,

Cedric


************************************************************************
*
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.
************************************************************************
*

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

--------------------------------------------------------------------------
This message w/attachments (message) may be privileged, confidential or
proprietary, and if you are not an intended recipient, please notify the
sender, do not use or share it and delete it. Unless specifically indicated,
this message is not an offer to sell or a solicitation of any investment
products or other financial product or service, an official confirmation of
any transaction, or an official statement of Merrill Lynch. Subject to
applicable law, Merrill Lynch may monitor, review and retain e-communications
(EC) traveling through its networks/systems. The laws of the country of each
sender/recipient may impact the handling of EC, and EC may be archived,
supervised and produced in countries other than the country in which you are
located. This message cannot be guaranteed to be secure or error-free.
References to "Merrill Lynch" are references to any company in the Merrill
Lynch & Co., Inc. group of companies, which are wholly-owned by Bank of
America Corporation. Securities and Insurance Products: * Are Not FDIC
Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit *
Are Not a Condition to Any Banking Service or Activity * Are Not Insured by
Any Federal Government Agency. Attachments that are part of this
E-communication may have additional important disclosures and disclaimers,
which you should read. This message is subject to terms available at the
following link: http://www.ml.com/e-communications_terms/. By messaging with
Merrill Lynch you consent to the foregoing.
--------------------------------------------------------------------------





Archive powered by MHonArc 2.6.24.

Top of Page