Skip to Content.
Sympa Menu

freetds - Re: [freetds] bcp error with MS SQL

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Patrick Dunnigan" <patrick.dunnigan AT centivia.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] bcp error with MS SQL
  • Date: Thu, 11 Aug 2005 11:37:39 -0400

Your problem may be there locale thing below. I don't know how help you with
that except look at the extended properties of the database table you are
importing into? Freetds.conf properties?

Are you using dblib? I have been successful with dblib BCP in. I was not
successful with ctlib BCP, hence I switched to dblib a while ago.

Suggestion: make a one column table with a one column bcp import. Take it
down to the lowest common denominator and work your way to the more complex.

Maybe post a snippet of code, your freetds.conf and ddl for the table and I
(or others) can take a look.

Patrick

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Schrama, eric (IT)
Sent: Thursday, August 11, 2005 10:08 AM
To: freetds AT lists.ibiblio.org
Subject: [freetds] bcp error with MS SQL

Hello,

I have been trying to bcp from Linux to SQL Server 2000. So far I have
been have been able to bcp out from SQL Server but cannot bcp from Linux
to SQL Server. A simple test of loading a 1 integer column table always
results in bad data being loaded. The numbers loaded are completely
unrelated to the source files (i.e. 1 loads as 17293822569102704640).
When I bcp out the data file is created on my Linux server without
issue. The crazy thing is when I bcp the same file back into SQL Server
it productes the crazy integers in the SQL table. To me this looks like
some sort of locale or character set mismatch. I am unsure where to
begin.



One more thing - I captured the following snippet from the freetds log
file:

iconv to convert client-side data to the "ISO-8859-1" character set

16:40:18.852183 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE"

16:40:18.852221 tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE



Thanks in advance,

Eric Schrama
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does
not waive confidentiality or privilege, and use is prohibited.
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds







Archive powered by MHonArc 2.6.24.

Top of Page