overFlow error in VB while reading data from DB 
Author Message
 overFlow error in VB while reading data from DB

i fire a select query and retrieve records from
database..one of the field is of type integer (int in
SQLserver 2000) i observed that the integer column was
having a big number. bcoz of which i am getting an
overflow error in VB. i tried out by reducing the number
explicitly in the database..it worked properly.... if i
enter a big number in the integer column directly, it
accepts..it means that it is not a database error. i would
like to know why this "overflow" error is coming..? how do
i rectify this error.....since i cannot reduce the number
that is entered in the database.
thanks and regards
vijay


Sat, 21 Aug 2004 23:41:28 GMT  
 overFlow error in VB while reading data from DB
Howdy Vijay,
They may both say int but there apples and rubarb. VB int
limit is about +- 63,000. In VB try using a lng value
instead. This has a limit of +- 2.1 billion.

Hope it helps.

Harold

Quote:
>-----Original Message-----
>i fire a select query and retrieve records from
>database..one of the field is of type integer (int in
>SQLserver 2000) i observed that the integer column was
>having a big number. bcoz of which i am getting an
>overflow error in VB. i tried out by reducing the number
>explicitly in the database..it worked properly.... if i
>enter a big number in the integer column directly, it
>accepts..it means that it is not a database error. i
would
>like to know why this "overflow" error is coming..? how
do
>i rectify this error.....since i cannot reduce the number
>that is entered in the database.
>thanks and regards
>vijay
>.



Sun, 22 Aug 2004 05:33:54 GMT  
 overFlow error in VB while reading data from DB
"int" in SQL Server is equivalent to "Long" in Visual Basic, so you'll need
to declare your VB variable As Long.


Quote:
> i fire a select query and retrieve records from
> database..one of the field is of type integer (int in
> SQLserver 2000) i observed that the integer column was
> having a big number. bcoz of which i am getting an
> overflow error in VB. i tried out by reducing the number
> explicitly in the database..it worked properly.... if i
> enter a big number in the integer column directly, it
> accepts..it means that it is not a database error. i would
> like to know why this "overflow" error is coming..? how do
> i rectify this error.....since i cannot reduce the number
> that is entered in the database.
> thanks and regards
> vijay



Mon, 23 Aug 2004 23:56:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Access DB Field's opening problem (Error 6, Overflow)

2. Reading Excel dates/times overflow errors

3. Overflow error reading files > 32767 lines

4. Reading Excel dates/times overflow errors

5. Data OverFlow Error Message

6. Error trying to read calendar data using VB.NET when Outlook is not open

7. VB cannot open/read data from excel file anymore - automation error

8. Copy Data Structures no data DB to DB

9. Read data from DB into combobox?

10. Data Control + DBComboBox Makes DB Read-Only ????

11. Read data from DB, write to registry via VBscript

12. read/write bitmap data to an ORACLE db in VB50

 

 
Powered by phpBB® Forum Software