My Oracle Support Banner

ORA-01461 Can Bind A Long Value Only For Insert Into A Long Column (Doc ID 387587.1)

Last updated on JULY 16, 2019

Applies to:

Oracle Database - Enterprise Edition - Version and later
Microsoft Windows (32-bit)
***Checked for relevance on 13th Jul 2016 ***


Working with a Windows client.

Normally when binding, the OCIBindByName call expects the size of the data being passed in. The value is passed via the value_sz parameter of the OCIBindByName call.

When dynamically binding (using the OCI_DATA_AT_EXEC) it usually means the data and size is unknown until run-time which leads to the question of what does the value_sz parameter pertain to.

If the actual data size will be 500, using a size 167 works but using a size 166 fails with the following error:

ORA-01461: can bind a LONG value only for insert into a LONG column


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

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.