Home » Developer & Programmer » Precompilers, OCI & OCCI » bulk insert failure for different NLS_LANG setting
bulk insert failure for different NLS_LANG setting [message #93909] Mon, 24 March 2003 16:21
C.J.Sun
Messages: 1
Registered: March 2003
Junior Member
I found a weird problem in OCI bulk insert. It failed
if client locale setting is different from DB server.
my DB server locale is NLS_LANG=AMERICAN_AMERICA.ZHT16BIG5 and the table is
very simple:
SQL> desc foo
Name Null? Type
------------ ------ ------------------
A VARCHAR2(200)
B VARCHAR2(200)
C NUMBER(9)

If I set client locale same as server,
i.e.NLS_LANG=AMERICAN_AMERICA.ZHT16BIG5,
bulk insert OCIStmtPrepare(), OCIBindByPos(),
OCIStmtExecute() runs sucessfully.

However, if I set client locale as NLS_LANG=AMERICAN_AMERICA.UTF8, it throws bind failure:
OCI Error: ORA-01461: can bind a LONG value only for
insert into a LONG column

What's more strange is that if the table has only 2
columns as follow, bulk insert now succeeds with any
locale setting. Anyone can help me out ? Thanks.

SQL> desc foo
Name Null? Type
---------------- -------- ----------------
A VARCHAR2(200)
C NUMBER(9)
Previous Topic: Error in Pro*C/C++ Application
Next Topic: Re: want to download Pro*c/C++ compiler free download site
Goto Forum:
  


Current Time: Mon May 27 10:31:35 CDT 2024