overflow error


i use delphi 5,access
why when my program runs to windows NT : no error
but when it runs under windows xp or other it gives an overflow error

someone can help me?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

could u plz be more specific on what your program actually does.
a bit  more information would be usefull.

when, where, error message ??
Wim ten BrinkSelf-employed developerCommented:
Okay, based on the information you've provided, I can only conclude that you're using some function that returns a value that generates an overflow in W2K while it doesn't in NT. For example, when you ask for the amount of available diskspace, it could be that your NT system has a small disk so the size fits the variable perfectly. But on W2K with a bigger disk the size might be bigger than the variable can handle.
One option would be to compile your application with Overflow checking turned off in your project options. Then the overflow will still occur but you won't get any notifications about it.
The other option would be to debug your project on the XP system and wait until the exception is raised.

And remember, we're not mindreaders. We are good but not that good. If you could be more specific, we could provide more specific help too. ;-)
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.


Well an overflow is exactly that.

The number you are using is greater than the type cast of the number.

I don't remember the exact specifics of them all. In VB an integer can't be bigger than 32k+ (32260 I think).  Likewise a string at one time in Windows had a maximum size of 256 and then when NT first came out it was 64k. (dont know what it is now - but I guess a lot....).

What you need to do is identify the procedure where the fault is occurring and then increase the size of the numbers (float generally works).

To find exactly where the problem is put msgbox's every few lines and you will see where the error is occurring.  Don't try to figure it out - just work around it.

Generic integer types for 32-bit implementations of Delphi  
Type      Range      Format
Integer      -2147483648..2147483647      signed 32-bit
Cardinal      0..4294967295      unsigned 32-bit

Fundamental integer types  
Type      Range      Format
Shortint      -128..127      signed 8-bit
Smallint      -32768..32767      signed 16-bit
Longint      -2147483648..2147483647      signed 32-bit
Int64      -2^63..2^63-1      signed 64-bit
Byte      0..255      unsigned 8-bit
Word      0..65535      unsigned 16-bit
Longword      0..4294967295      unsigned 32-bit

Fundamental real types
Type      Range      Significant digits      Size in bytes
Real48      2.9 x 10^-39 .. 1.7 x 10^38      11-12      6
Single      1.5 x 10^-45 .. 3.4 x 10^38      7-8      4
Double      5.0 x 10^-324 .. 1.7 x 10^308      15-16      8
Extended      3.6 x 10^-4951 .. 1.1 x 10^4932      19-20      10
Comp      -2^63+1 .. 2^63 -1      19-20      8
Currency      -922337203685477.5808.. 922337203685477.5807      19-20      8
The generic type Real, in its current implementation, is equivalent to Double.

Generic real types
Type      Range      Significant digits      Size in bytes
Real      5.0 x 10^-324 .. 1.7 x 10^308      15-16      8

from the Delphi Help files :)
Simplest debugging is to run program under debugger on XP and see what is happening when the overflow occurs. Failing that, try a tool like Eureka Log http://eurekalog.com or MadExcept  http://www.madshi.net/. I've used exceptional magic, but it seems to be dead.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Yes, ingenosya, please be more specific.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.