Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01461 (Oracle 10g)
ORA-01461 [message #387322] Wed, 18 February 2009 18:07 Go to next message
oracledba55
Messages: 2
Registered: February 2009
Location: Paris
Junior Member
I am trying to update a table which contains Columns of datatype varchar2, number only. only one column is of varchar2(4000). But sometimes I get following error:

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


I am getting this error only sometimes and most of the times it works. does anybody know the reason
Re: ORA-01461 [message #387327 is a reply to message #387322] Wed, 18 February 2009 18:27 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you

>I am getting this error only sometimes and most of the times it works. does anybody know the reason
Sometimes a LONG data type is involved & other time not involved.

You need to debug your application.
Re: ORA-01461 [message #387365 is a reply to message #387322] Thu, 19 February 2009 00:38 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
ORA-01461 can bind a LONG value only for insert into a LONG column
Cause: An attempt was made to insert a value from a LONG datatype into another datatype. This is not allowed.
Action: Do not try to insert LONG datatypes into other types of columns.

Regards
Michel
Re: ORA-01461 [message #388973 is a reply to message #387365] Thu, 26 February 2009 17:51 Go to previous messageGo to next message
oracledba55
Messages: 2
Registered: February 2009
Location: Paris
Junior Member
I know from where it is coming in my appliacation and we are executing a update statement and not insert statemnet. But in my environment it is not reproducible, it only occurs in prod env and that is also only sometimes and the same update staement run on another day correctly. hence not able to trace it.
I am using Oracle 10g and ojdbc14 driver.

[Updated on: Thu, 26 February 2009 17:51]

Report message to a moderator

Re: ORA-01461 [message #389091 is a reply to message #388973] Fri, 27 February 2009 04:32 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You have some debugging to do.

check what the length of the variable that's going to go into this Vc2(4000) is when the error happens.
Previous Topic: SOME.SYSTEM CLASS
Next Topic: dynamic sql issue
Goto Forum:
  


Current Time: Thu Dec 08 18:22:19 CST 2016

Total time taken to generate the page: 0.07139 seconds