473,320 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Please help with an overflow error with database

Dan
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet
and still trying to figure some things out.

In order to locate a row in an access databse file .mdb, i am using this
call

Dim dr As DataRow
dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtS can.Text)

where me.txtscan.text is a value from 2 to 9323493000236.
when searching for smaller values i have nu problem. but when i search for
the larger values i get an error.

An unhandled exception of type 'System.OverflowException' occurred in
mscorlib.dll
Additional information: Value was either too large or too small for an
Int32.

I have tried converting but i still get the same error. I need to be able to
search for these values as they are unit ID numbers. Is there a way to do
this?
Perhaps there is a better way to search the database for the row containing
the data? Any help would be great.

Thanks alot

Dan Butler
ba********@hotmail.com
Nov 20 '05 #1
7 2186
The maximum number of rows that a DataTable can store is 16,777,216. Data
sets contain data tables.
For more info:
http://tinyurl.com/37sxa
"Dan" <ba********@hotmail.com> wrote in message
news:pRsJb.37246$gN.8936@fed1read05...
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet
and still trying to figure some things out.

In order to locate a row in an access databse file .mdb, i am using this
call

Dim dr As DataRow
dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtS can.Text)

where me.txtscan.text is a value from 2 to 9323493000236.
when searching for smaller values i have nu problem. but when i search for
the larger values i get an error.

An unhandled exception of type 'System.OverflowException' occurred in
mscorlib.dll
Additional information: Value was either too large or too small for an
Int32.

I have tried converting but i still get the same error. I need to be able to search for these values as they are unit ID numbers. Is there a way to do
this?
Perhaps there is a better way to search the database for the row containing the data? Any help would be great.

Thanks alot

Dan Butler
ba********@hotmail.com

Nov 20 '05 #2
Well, look at the size of the number

9,323,493,000,236

Int32:=

2,147,483,647

There is your problem.

Regards - OHM

Dan wrote:
Hi. I'm having a problem with searching a databse entry. I'm new to
dotnet and still trying to figure some things out.

In order to locate a row in an access databse file .mdb, i am using
this call

Dim dr As DataRow
dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtS can.Text)

where me.txtscan.text is a value from 2 to 9323493000236.
when searching for smaller values i have nu problem. but when i
search for the larger values i get an error.

An unhandled exception of type 'System.OverflowException' occurred in
mscorlib.dll
Additional information: Value was either too large or too small for an
Int32.

I have tried converting but i still get the same error. I need to be
able to search for these values as they are unit ID numbers. Is there
a way to do this?
Perhaps there is a better way to search the database for the row
containing the data? Any help would be great.

Thanks alot

Dan Butler
ba********@hotmail.com


--
Best Regards - OHM

O_H_M{at}BTInternet{dot}com
Nov 20 '05 #3
Dan
Thanks for the responses!
Maybe if i explain what i am working with, perhaps someone could help me
out.
I have a database with 15,150 rows. The numbers in column one, representing
an ID range from 2 to 9323493000236. All uniquie entries, no duplicates.
Since there are only 15,000 rows (or so) you can tell that alot of number
skipping is going on.
The way it wors is the user enters in a barcode number via hand or scanner.
The program then is supposed to search for the value. However, when i use
the find i spoke of in my earlier post, i was getting the overflow error. I
figured since the data was within the acceptable amount of rows, I would be
able to search for it? I think i am probably going about searching for the
corresponding row (or index) the wrong way.

Thanks again
Dan Butler
Ba********@hotmail.com
"Dan" <ba********@hotmail.com> wrote in message
news:pRsJb.37246$gN.8936@fed1read05...
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet
and still trying to figure some things out.

In order to locate a row in an access databse file .mdb, i am using this
call

Dim dr As DataRow
dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtS can.Text)

where me.txtscan.text is a value from 2 to 9323493000236.
when searching for smaller values i have nu problem. but when i search for
the larger values i get an error.

An unhandled exception of type 'System.OverflowException' occurred in
mscorlib.dll
Additional information: Value was either too large or too small for an
Int32.

I have tried converting but i still get the same error. I need to be able to search for these values as they are unit ID numbers. Is there a way to do
this?
Perhaps there is a better way to search the database for the row containing the data? Any help would be great.

Thanks alot

Dan Butler
ba********@hotmail.com

Nov 20 '05 #4
You might try searching using a String instead of and Int32.

"Dan" <ba********@hotmail.com> wrote in message
news:ORGJb.37320$gN.32105@fed1read05...
Thanks for the responses!
Maybe if i explain what i am working with, perhaps someone could help me
out.
I have a database with 15,150 rows. The numbers in column one, representing an ID range from 2 to 9323493000236. All uniquie entries, no duplicates.
Since there are only 15,000 rows (or so) you can tell that alot of number
skipping is going on.
The way it wors is the user enters in a barcode number via hand or scanner. The program then is supposed to search for the value. However, when i use
the find i spoke of in my earlier post, i was getting the overflow error. I figured since the data was within the acceptable amount of rows, I would be able to search for it? I think i am probably going about searching for the
corresponding row (or index) the wrong way.

Thanks again
Dan Butler
Ba********@hotmail.com
"Dan" <ba********@hotmail.com> wrote in message
news:pRsJb.37246$gN.8936@fed1read05...
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet and still trying to figure some things out.

In order to locate a row in an access databse file .mdb, i am using this
call

Dim dr As DataRow
dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtS can.Text)

where me.txtscan.text is a value from 2 to 9323493000236.
when searching for smaller values i have nu problem. but when i search for the larger values i get an error.

An unhandled exception of type 'System.OverflowException' occurred in
mscorlib.dll
Additional information: Value was either too large or too small for an
Int32.

I have tried converting but i still get the same error. I need to be able
to
search for these values as they are unit ID numbers. Is there a way to

do this?
Perhaps there is a better way to search the database for the row

containing
the data? Any help would be great.

Thanks alot

Dan Butler
ba********@hotmail.com


Nov 20 '05 #5
Cor
Hi Dan,

Why not first fill a little dataset with a "where" clause or use a
datareader with that?

Would give you a lot of more performance I think

Cor
Thanks for the responses!
Maybe if i explain what i am working with, perhaps someone could help me
out.
I have a database with 15,150 rows. The numbers in column one, representing an ID range from 2 to 9323493000236. All uniquie entries, no duplicates.
Since there are only 15,000 rows (or so) you can tell that alot of number
skipping is going on.
The way it wors is the user enters in a barcode number via hand or scanner. The program then is supposed to search for the value. However, when i use
the find i spoke of in my earlier post, i was getting the overflow error. I figured since the data was within the acceptable amount of rows, I would be able to search for it? I think i am probably going about searching for the
corresponding row (or index) the wrong way.

Nov 20 '05 #6
That would be a good idea unless you where searching through the data with a
lot.
Another option would be to use a DataView.

"Cor" <no*@non.com> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
Hi Dan,

Why not first fill a little dataset with a "where" clause or use a
datareader with that?

Would give you a lot of more performance I think

Cor
Thanks for the responses!
Maybe if i explain what i am working with, perhaps someone could help me
out.
I have a database with 15,150 rows. The numbers in column one, representing
an ID range from 2 to 9323493000236. All uniquie entries, no duplicates.
Since there are only 15,000 rows (or so) you can tell that alot of number skipping is going on.
The way it wors is the user enters in a barcode number via hand or

scanner.
The program then is supposed to search for the value. However, when i use the find i spoke of in my earlier post, i was getting the overflow error. I
figured since the data was within the acceptable amount of rows, I would

be
able to search for it? I think i am probably going about searching for

the corresponding row (or index) the wrong way.


Nov 20 '05 #7
Dan,
What is the type of your primary key column? You are passing a string
to search with boxed as an object which may be causing some of the problems.
Try calling Convert.Toxxx(Me.txtScan.Text) where xxx is the type of the
column.
If the column is of type char instead of varchar you may have to pad the
string appropriately first.

Ron Allen
"Dan" <ba********@hotmail.com> wrote in message
news:ORGJb.37320$gN.32105@fed1read05...
Thanks for the responses!
Maybe if i explain what i am working with, perhaps someone could help me
out.
I have a database with 15,150 rows. The numbers in column one, representing an ID range from 2 to 9323493000236. All uniquie entries, no duplicates.
Since there are only 15,000 rows (or so) you can tell that alot of number
skipping is going on.
The way it wors is the user enters in a barcode number via hand or scanner. The program then is supposed to search for the value. However, when i use
the find i spoke of in my earlier post, i was getting the overflow error. I figured since the data was within the acceptable amount of rows, I would be able to search for it? I think i am probably going about searching for the
corresponding row (or index) the wrong way.

Thanks again
Dan Butler
Ba********@hotmail.com
"Dan" <ba********@hotmail.com> wrote in message
news:pRsJb.37246$gN.8936@fed1read05...
Hi. I'm having a problem with searching a databse entry. I'm new to dotnet and still trying to figure some things out.

In order to locate a row in an access databse file .mdb, i am using this
call

Dim dr As DataRow
dr = Me.DsMaster.Tables("MasterList").Rows.Find(Me.txtS can.Text)

where me.txtscan.text is a value from 2 to 9323493000236.
when searching for smaller values i have nu problem. but when i search for the larger values i get an error.

An unhandled exception of type 'System.OverflowException' occurred in
mscorlib.dll
Additional information: Value was either too large or too small for an
Int32.

I have tried converting but i still get the same error. I need to be able
to
search for these values as they are unit ID numbers. Is there a way to

do this?
Perhaps there is a better way to search the database for the row

containing
the data? Any help would be great.

Thanks alot

Dan Butler
ba********@hotmail.com


Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: xixi | last post by:
i am using db2 udb v8.1 on win 64 bit, i found this on my db2diag.log 2003-11-12-13.20.05.550001 Instance:DB2 Node:000 PID:1840(db2syscs.exe) TID:3068 Appid:AC100453.G761.00F8D15749BE...
6
by: Not Me | last post by:
Hi, I'm getting the datetime field overflow error using odbc to connect to an sql database from access. This happens when I try to enter the date 13/01/1899. It did happen when using...
15
by: Buck Rogers | last post by:
Hi guys! Task 1: Write a program which presents a menu with 5 options. The 5th option quits the program. Each option should execute a system command using system(). Below is my humble...
4
by: Chua Wen Ching | last post by:
Thanks Derek... Okay i had another question.. my program runs smoothly for the first minute, after 1 minute... suddenly it breaks and display this error: do you know what is the cause of...
0
by: paragdere | last post by:
Hi all, I am using a recursive function to create a tree. The function works fine when the tree being created has few nodes, but if this count is increased above 90, I get a stack overflow...
1
by: Steve Fraser | last post by:
I am wondering if anyone can help me out. I have an Access Database that has been running since forever. Now when I try to open a form I get the "Run-time error '6' Overflow message and a window...
4
by: vir | last post by:
we use an E-office application where server is SQL server 7.0 and client side its MS access In our VB program we use ASP to synchronization and update client database from server and each table...
1
by: innivive | last post by:
I am having a problem with having margins display correctly in IE7, Firefox and Safari. I am not sure if it is the "double margin error" or something else. Any help would be appreciated. The file...
0
by: bradman1861 | last post by:
hello i am getting a overflow error when I try to run this: here is the error: System.Data.OleDb.OleDbException was unhandled Message="Overflow" Source="Microsoft JET Database Engine" ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.