This discussion is archived
3 Replies Latest reply: Apr 12, 2013 2:22 AM by Timo Hahn RSS

Error using setBigDecimal on column type Number

Kamal Kishore Newbie
Currently Being Moderated

I am facing an issue very randomly.
I have a table with column type Number. In my java class where i insert values into this table, I am using setBigDecimal function to bind the value.
I dont face the issue always, but at times, I am getting the below exception:

[XHUB-108] A SQLException occurred while doing a database operation ( myfunction())[java.sql.SQLException:1461:ORA-01461: can bind a LONG value only for insert into a LONG column.

I got this issue inserting a value - 493414 into the column. Where as, I was able to insert values way bigger than this into the table.

Should i use setNUMBER function to insert the values and avoid the issue?
Is this a bug in setBigDecimal funciton?

Kindly suggest.



  • Correct Answers - 10 points
  • Helpful Answers - 5 points