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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OverFlow - what is it? 1

Status
Not open for further replies.

kevink

Programmer
Nov 23, 1999
53
IE
Hello all!<br><br>I have an Access database with circa. 50,000 records in it - the whole size is approx. 40 MB.&nbsp;&nbsp;When I try and run a search an &quot;overflow&quot; error sometimes appears (normally when I start paging through the recordsets).<br><br>What exactly does &quot;Overflow&quot; mean?&nbsp;&nbsp;And any ideas on how to prevent it?&nbsp;&nbsp;Another occasion where this popped up was when I set the recordsource for the form in the FORM LOAD sub.&nbsp;&nbsp;Once the databse reached 15,000 records the Overflow error started to appear.<br><br>Thanks in advance,<br><br>Kevin
 
overflow means that you're trying to store too large or small a number in a variable, typically an integer value greater than 32,767 or less than -32,768. the way you solve this is to change the variable types to a bigger one. ie: byte to integer, integer to long, long and single to double.<br><br>you don't say what sort of error you're getting. are you getting a GPF (windows crashing access), a database error (jet complaining), or VB error 6?<br><br>in the first case you should check the microsoft office update download site briefly to check for known issues, but you'll probably need to reinstall.<br><br>if it's the second, try:<br>1. one of the fields on a table (or in a query) may be of too small a type.<br>2. one of the temporary variables in your SQL string may be too small. try using data conversion functions around calculations (i'm no whizz at SQL so you'll have to RTM).<br><br>if it's the last, try changing the way your variables ae prototyped.<br><br>see <A HREF=" TARGET="_new"> for the method you should use so you don't screw everything up.<br><br>good luck. especially if it's the SQL.<br>
 
&quot;Cliff Notes&quot; version of above<br>Get more computer to solve your problem<br>PIII 600, 256meg RAM, 10 gig Hardrive<br>
 
<br><br>I have encountered this error when executing code written by other programmers that provided custom formatting to the field values in a recordset. I eliminated the overflow error by eliminating the code that used 'recursion'. I have used extremely large queries that returnted large recordsets 200,000 + records and didn't have an 'overflow' problem. <br><br>Take a look at the number of records that are returned in a given 'fetch' operation if you like, but I'll bet you have some code in line that is 'formatting' the contents of fields in the recordset before it is displayed. <br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
Just a footnote:
The &quot;overflow &quot;message will also appear if an expression in a query encounters a record where the denominator field is zero.
I overcome this problem by using an &quot;iff&quot; function to only run the calculation if the denominator field is not equal to zero.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top