File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The conversion of the varchar value '5438954444' overflowed an int column.

 
veda Cherak
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting the above exception. Please help.
I populated my column(Sys_number) with 10 rows and each with 10 digits.
When I enter any value less than 10 digits I get this exception.

Name : Sys_Number
Datatype : varchar(50)

 
Scott Selikoff
author
Saloon Keeper
Posts: 3890
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the exception? Also, it's better to used PreparedStatements for input parameter than Statements.
 
chris webster
Bartender
Pie
Posts: 2359
31
Linux Oracle Postgres Database Python Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message seems plausible, because 5,438,954,444 would be too big a value for an int variable. As I understand it, an int can hold values between -2,147,483,648 and 2,147,483,647. So the question is what is really in your table - is this big value really in there, or is it created accidentally in your Java code? If the value is correct, then maybe you need to use a long variable in Java instead.

Why don't you run your SQL separately in your database's SQL interface, so you can check what's really in your table? Then you'll know whether the problem is data or code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic