cww
cww

Reputation: 653

VB run time error 6 overlow

I am facing VB run time 6 overflow. When the time I fetch the result from database and put inside variable, I got this error, overflow.

I understood I can change to dim a as long, and this problems will be solve. but is it every variable I need to declare as long, so I wouldn't face this problem?

This problems doesn't exist until my database row id is larger than 30,000++.

Is there anyway I can prevent this issues?

Upvotes: 0

Views: 3701

Answers (1)

Bob Palmer
Bob Palmer

Reputation: 4762

Nope, in vb6 an integer data type is limited to 32K or so. So if you start having variables kick over that, you will start getting overflow errors.

(And here's an MSDN article on numeric types in VB)

Upvotes: 2

Related Questions