473,595 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Numeric overflow

Hello folks,
I have a servlet in a Java web app that accesses an oracle table with
a column that is NUMBER(12)
When I put an integer into it of 10 digits or larger I get a numeric
overflow error. I am using the getInt method and putting that into a
java int variable. Do either of these have a max length and if so what
should I be using for large number??

thanks in advance,
DM
Jul 17 '05 #1
2 9388

"DiggidyMac k69" <Di***********@ hotmail.com> wrote in message
news:c8******** *************** **@posting.goog le.com...

Hello folks,
I have a servlet in a Java web app that accesses an oracle
table with a column that is NUMBER(12)

When I put an integer into it of 10 digits or larger I get
a numeric overflow error. I am using the getInt method
and putting that into a java int variable. Do either of these
have a max length and if so what should I be using for
large number??


An 'int' can hold values -2^31 through to 2^31 - 1 [i.e. max 10 digits]. A
'long' can hold values -2^63 through to 2^63 - 1 [i.e. 19 max digits].

You make the choice :) !

I hope this helps.

Anthony Borla
Jul 17 '05 #2
hi
Java has great support for this
i was writing an application that simulates RSA algorithm (of course
it was for educational purpose ;) not practical use ) .....
but i found a good support for real largeeeeeeeeeee eeeee integers
check out java.math.BigIn teger class
it should suffice your needs ...

cheers
amey

Di***********@h otmail.com (DiggidyMack69) wrote in message news:<c8******* *************** ***@posting.goo gle.com>...
Hello folks,
I have a servlet in a Java web app that accesses an oracle table with
a column that is NUMBER(12)
When I put an integer into it of 10 digits or larger I get a numeric
overflow error. I am using the getInt method and putting that into a
java int variable. Do either of these have a max length and if so what
should I be using for large number??

thanks in advance,
DM

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1950
by: shank | last post by:
I got the following error: Arithmetic overflow error converting numeric to data type numeric I'm sure it was one of my currency fields. However, the real total of that column was $776.92 How did it get submitted as $776.9200000000001 ? Is there a way I can assure those extra digits get whacked? thanks!
1
8836
by: DiggidyMack69 | last post by:
Hello folks, I have a servlet in a Java web app that accesses an oracle table with a column that is NUMBER(12) When I put an integer into it of 10 digits or larger I get a numeric overflow error. I am using the getInt method and putting that into a java int variable. Do either of these have a max length and if so what should I be using for large number?? thanks in advance, DM
6
4110
by: Eugene | last post by:
Hi, I have a field: usercode In Query Analyzer: UPDATE tblUserProcess SET usercode = 1002 Result: Error "Arithmetic overflow error for data type tinyint, value = 1002. The statement has been terminated."
2
8670
by: Robert McEuen | last post by:
Using Access 97, Windows XP I'm receiving a Numeric Field Overflow error during text import that I did not receive before I split my database. Another thread I found suggested that the cause of this error might be due to columns on the text file being in a different order than fields in the destination table, but they're the same in my case. I'm thinking a workaround might be to import to a temp table in the front-end, run an append...
2
8375
by: Eugene | last post by:
Hi, In Query Analyzer: update tblUserProcess set usercode = 1002 Error: Arithmetic overflow error for data type tinyint, value = 1002. The statement has been terminated.
0
1569
by: Bob | last post by:
I hope somebody can help. I'm linking to an excel spreadsheet with several fields that come across as double. I can query the linked table fine, but when I make a form with the query as the data source I get a "Numeric Overflow Error" as soon as the form opens. Any ideas?
3
2151
by: MLH | last post by:
A wide comma delimited text file import into A97 failed with an overflow error. I'm estimating it to have been no more than 1000 records. 100% of all the fields were quoted strings or ZLS's. What most likely caused the overflow? Might it be upper limit on number of fields in table?
4
7602
by: darrel | last post by:
I'm getting this error: Arithmetic overflow error converting numeric to data type numeric. Triggered on this line of my code: objOleDbAdapter.Fill(DS, "rss") Everything works when this is pointed at one DB server (our staging server) but when we point it at another DB server (our production server) I get the error.
2
686
by: jgscott3 | last post by:
I have a query that simply totals a number of fields from a linked table. If I run it several times, it works fine for a couple of runs and then inexplicably returns a numeric field overflow error message. If I then open it in design view and change the format of any total field (it doesn't seem to matter which one!), it will again run fine a couple of times. Then the error message will occur again. Can anyone please explain this and...
0
7955
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8019
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8251
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
3873
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1490
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.