Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ora-01461 error.

2888310Feb 19 2015 — edited Feb 19 2015

Hi all,

Recently our project team encounters a problem: ORA-01461 can bind a LONG value only for insert into a LONG column.

We have a table (named ITEMS) column , the type is nvarchar2(2000). When we use JDBC PreparedStatement to insert 2000 length Chinese characters value into it, it goes wrong.

The sql is "update ITEMS set description = ? where id = ....."

I remember nvarchar2 type ignores data's byte length, however only less than 1333's length can be inserted.

Then I tried this sql : "update ITEMS set description = description || ? where id = ....." , I add value by several times and it goes right. So I think nvarchar2(2000) can actually stored 2000 characters.

The oracle edition is : oracle 11g 11.2.0.4.0

The jdbc driver I tried all kinds of edition like ojdbc6 and ojdbc14.

The oracle charset is AL32UTF8, the national character set is AL16UTF16 and I have already set system's environment variable to : AMERICAN_AMERICA.AL32UTF8.

Can anyone help on this issue? Many thanks!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 19 2015
Added on Feb 19 2015
0 comments
123 views