File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Inserted value too large for column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Inserted value too large for column" Watch "Inserted value too large for column" New topic
Author

Inserted value too large for column

Carty Ellis
Greenhorn

Joined: Oct 04, 2003
Posts: 20
I am accessing an Oracle DB via JDBC - Database column defined as num(6,4).
Data coming into the program is a string "010000" which I handle with:
int iscale = NumberUtils.stringToInt(StringUtils.substring((inList.get(i+2)).toString(),5,11));
munitscale = (float) iscale / 10000;
When I System.out.println(munitscale) I get 1.0 for a value. However when I try to insert that value into the database column I get an "ORA-1401 Inserted value too large for column."
I am NOT using a prepared statement - the one place I need prepared I am handling with an escape clause (ts) - TimeStamp.
Any suggestions?
Carty Ellis
Greenhorn

Joined: Oct 04, 2003
Posts: 20
"Nevermind" as Emily Latella would say -
Whoops. I found it.
Rudy Dakota
Ranch Hand

Joined: Jul 27, 2002
Posts: 54
Hi Carty,
You might want to share it with those among us that were puzzled by your initial post. Share and learn!
Good riding,
Rudy.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserted value too large for column
 
Similar Threads
Is there a way of knowing which record failed in Batch Insert
inserted value too large for column
Exception in executing the query
How to have rollback exception reveal real Exception
EJB 2.0 Error