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

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

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

Post by joongtang » Fri 12 Apr 2019 07:22

Hello.
After connecting to Oracle 10g in direct mode, when I insert VARCHAR2(4000) column to some value, occur this error
ORA-01461: can bind a LONG value only for insert into a LONG column
However, if the column is sent to the back of the insert statement or the value is less than 715 Bytes, the error does not occur.

Code: Select all

CREATE TABLE TEST (
  COL1 VARCHAR2(10 BYTE),
  COL2 VARCHAR2(4000 BYTE),
  COL3 VARCHAR2(10 BYTE) 
)
This statment occur error

Code: Select all

INSERT INTO TEST 
 (
    COL1, COL2, COL3 
 )
 VALUES 
 (
    :COL1, :COL2, :COL3
 )
but, this statment is not occur error and works.

Code: Select all

INSERT INTO TEST 
 (
    COL1, COL2, COL3 
 )
 VALUES 
 (
    :COL1, :COL2, 'Value'
 )
and dbForge studio 2018 for Oracle 32bit appear same error.

Thanks advance.

Oracle Server Version
- Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

MaximG
Devart Team
Posts: 1337
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Mon 15 Apr 2019 12:27

We could not reproduce the issue according to your description. For further investigation, please compose and send us a project, execution of which causes the issue. It is convenient to do it using the e-support form : https://www.devart.com/company/contactform.html
What NLS parameters the used Oracle DB has ( in order for you to get them, use the following query : select * from v$nls_parameters )

joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

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

Post by joongtang » Mon 15 Apr 2019 23:58

NLS parameters is

Code: Select all

NLS_LANGUAGE			KOREAN
NLS_TERRITORY			KOREA
NLS_CURRENCY			?
NLS_ISO_CURRENCY		KOREA
NLS_NUMERIC_CHARACTERS		.,
NLS_CALENDAR			GREGORIAN
NLS_DATE_FORMAT			RR/MM/DD
NLS_DATE_LANGUAGE		KOREAN
NLS_CHARACTERSET		KO16KSC5601
NLS_SORT			BINARY
NLS_TIME_FORMAT			HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT		RR/MM/DD HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT		HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT		RR/MM/DD HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY		?
NLS_NCHAR_CHARACTERSET		AL16UTF16
NLS_COMP			BINARY
NLS_LENGTH_SEMANTICS		BYTE
NLS_NCHAR_CONV_EXCP		FALSE

MaximG
Devart Team
Posts: 1337
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Tue 16 Apr 2019 14:45

Please specify the version of UniDaC you are using. To investigate the issue, we will need a small test example showing the inert of records to the TEST table.

joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

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

Post by joongtang » Tue 16 Apr 2019 23:47

Version is 7.3.10 Pro and 7.4.12 Pro.

Test Table and Insert example is written in the upper article.

Sorry for not supporting DB connect string for security reasons.

Thanks.

MaximG
Devart Team
Posts: 1337
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Wed 17 Apr 2019 12:36

To reproduce the issue, we need an example on Delphi or C++Builder showing the work with the parameters of the query you provided. It is convenient to do it using the e-support form : https://www.devart.com/company/contactform.html

joongtang
Posts: 16
Joined: Wed 07 Dec 2016 04:46

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

Post by joongtang » Fri 19 Apr 2019 00:54

While configuring the test server, it turns out to be an Oracle issue, not a UniDAC issue.

The two databases (A and B) are connected by DB Link.
The character set of DB-A is UTF8, and the version is 12c.
The character set of DB-B that I tried to insert values is KO16KSC5601, and the version is 10g.
It seems to be a character set issue between the two DBs.
An Error occurred when trying to insert values into test table in DB-B through DB-A.
It seems to be a character set issue between the two DBs.
The same error occurs in Oracle SQL Developer.

I am really sorry to report the wrong issue.
Thank you.

MaximG
Devart Team
Posts: 1337
Joined: Mon 06 Jul 2015 11:34

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

Post by MaximG » Thu 25 Apr 2019 14:37

We are glad that you found a necessary solution. Please don't hesitate to contact us with questions concerning UniDAC usage.

Post Reply