My Oracle Support Banner

ORA-01461 From JDBC Client When Inserting Into VARCHAR2(4000) Column (Doc ID 445072.1)

Last updated on DECEMBER 19, 2023

Applies to:

JDBC - Version 10.2.0.1 and later
Information in this document applies to any platform.

Symptoms

Having a database column defined as VARCHAR2(4000) in a table and trying to insert a character string which was 3983 characters using JDBC fails with a runtime error as follows in an Oracle Database with the character set AL32UTF8:

java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column


The same test case using a database with a character set as WE8ISO8859P1 works fine without any issue.

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.