Groups | Blog | Home
all groups > sql server odbc > august 2006 >

sql server odbc : Strange characters with Bulk Load


Mike C#
8/24/2006 5:14:16 PM
I'm writing a small app to bulk load some data and receiving strange
results. Some of the data contains non-standard alphabetic characters, like
the name Jose (with an accent over the e). It is being loaded into the
table as JosT. The column is a VARCHAR(50), and it seems to work with
regular INSERT statements. Has anyone encountered this type of stuff, or
would anyone have an idea of a setting I might need to set to make this
problem go away?

Thanks

jsfromynr
8/24/2006 10:20:00 PM
Hi Mike,

You may like to try this

create table tmpdata(n char(20),a int)

BULK INSERT tmpdata DATAFILETYPE ='widechar'
FROM 'c:\tmpdata.tbl'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '|\n'
)

I hope it solves the problem.

With Warm regards
Jatinder Singh
http://jatindersingh.blogspot.com
http://sqloracle.tripod.com
jsfromynr
8/24/2006 10:36:02 PM
Hi Mike,

I am not an expert on SQL Bulk API etc,but I think the problem is with
the unicode characters which in Bulk Insert we can specify. Where we
will do the same in case of API ,I am not aware. The option must exist
as you rightly said.

With Warm regards
Jatinder Singh
http://jatindersingh.blogspot.com
http://sqloracle.tripod.com
Mike C#
8/25/2006 1:25:22 AM
Hi js,

Thanks for the input. I should explain myself better (I was trying to get
out to run for the train when I wrote that). I'm actually using the ODBC
SQL Server Bulk Load API extensions (no BULK INSERT or BCP.EXE) to load the
data in (bcp_bind, bcp_sendrow, etc.) For some reason though it's
transmutating some of my characters on insert.

Thanks

[quoted text, click to view]

AddThis Social Bookmark Button