Re: BCP In of data too large fails [NC]
"Thompson, Bill D (London)" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <EB7B49D3F4B9FB47A1C253EED90D3A6A03CA9486@mllnc20mb054.emea.win.ml.com> |
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: [email protected] [mailto:[email protected]] 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 [email protected] 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 secur e 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. Secur ities 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. --------------------------------------------------------------------------