Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

runtime error 6; overflow

Status
Not open for further replies.

jmorlock

Programmer
Apr 25, 2003
46
US
I have a program that divides the data in one table into 4 different tables to elimnate all the redundant data. It worked fine the first few times I ran it. But now when i try to run it I keep getting an error popping up that says runtime error 6; overflow. it happens right away. Any idea why it would do this??
 
oftentimes, overflow errors are the result of trying to set a number that is too large for the datatype, e.g. setting an integer to a value > 32767 or < -32768.

Check your datatypes carefully.
 
As beetee pointed out, you may need to change an integer data type to a long data type. This occurs frequently when a database grows in size and counters, Like i = i + 1, now go above the 32767 limit. I always recommend longs for counters and integers only for controlled cases where you know the values can not exceed its maximum storage.


-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
Changing my datatype to long did the trick. thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top