Hi all,
I have a table containing 2 fields defined with VARCHAR2(4000) to store up to 4000 characters. I also have another table containing similar field with the same VARCHAR2(4000) data type defined.
There is also a web-based application written in java using JDBC oracle thin client driver. The sql statements in the applications are formed using prepareStatements to bind the values and fieldnames dynamically at run-time.
When I perform a test by running update transaction in the front end (which is a webpage from a web-based application written in java) that is supposed to update 3 large-sized data chunks (4000 english characters) into all three fields, the latter succeeded but the the attempt to insert into the table with 2 VARCHAR2(4000) fields failed and the oracle threw an exception
Code:
ORA-01461: can bind a LONG value only for insert into a LONG column
There isn't any fields in the database table defined as LONG date type. I was puzzled....what could have gone wrong? I've checked the source codes and non of the codes mentioned anything about binding the java.lang.String data type to Oracle's LONG data type..
I'm using Oracle 9i. Although this version of Oracle supports BLOB and CLOB data types, I cannot convert the fields into these types because of other technical constraints brought about by other software components working together with this application.
Could it be the Oracle thin driver has performed an implicit conversion over the large-sized character data (4000 characters)?