ORA-1461 UPDATING TABLE WITH 2 VARCHAR2(4000) FIELDS USING 10.X JDBC/9.2 RDBMS (Doc ID 430852.1)

Last updated on SEPTEMBER 01, 2014

Applies to:

JDBC - Version 10.2.0.2 and later
Information in this document applies to any platform.
This problem can occur on any platform.
***Checked for relevance on 27-Feb-2013***

Symptoms

-- Problem Statement:

When inserting a row with all the values (including two CLOBs with 30000 characters each) into a
table that has 57 columns, we get an ORA-01461 error. If we insert just a number column plus one
of the CLOB, it works fine.

1- DriverVersion: [10.2.0.2.0]
DriverMajorVersion: [10]
DriverMinorVersion: [2]
DriverName: [Oracle JDBC driver]
URL: [jdbc:oracle:oci8:@SIE3UKU]
UserName: [SIERRA_ADM]
Oracle
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production



2- Exception in thread "main" java.sql.SQLException: ORA-01461: can bind a LONG value only for
insert into a LONG column

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:676)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:602)
at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:571)
at oracle.jdbc.driver.T2CPreparedStatement.executeForRows(T2CPreparedStatement.java:764)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3422)
at test2.main(test2.java:168)


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms