0

front end: Visual Basic 6.0

Dim intAmount as integer
intamount = val(txtamount.text)

Back end: AS/400 db2
library: CPALLIB
field: amount
type: Numeric
Len: 9
Decimal: 2

value: 100000


The problem is that when i insert new record to my database for this field: (amount), the value is 100000. it returns runtime error -6 overflow.

Please help me..

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by debasisdas
0

The Integer data type is a 16-bit number which can range from -32768 to 32767.

You need to use Long data type which is a 32-bit number which can range from -2,147,483,648 to 2,147,483,647. Long variables can only contain non-fractional integer values. You need to use Long variables over Integers for increased performance.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.