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!