Microsoft KB Archive/62773

= Overflow Error OPENing ISAM File with TYPE > 255 Elements =

Article ID: 62773

Article Last Modified on 11/21/2006



This article was previously published under Q62773



SUMMARY
An &quot;Overflow&quot; error will occur when you OPEN a file FOR ISAM with a TYPE containing 255 or more elements. This is a limitation of the ISAM engine of Microsoft Basic Professional Development System (PDS) version 7.1 for MS-DOS and MS OS/2 and Basic PDS version 7.0 for MS-DOS.

To work around this limitation, reduce the number of elements in the main type by combining some elements into a nested type or into arrays.

For information on a related record size limitation that may cause an &quot;Overflow&quot; error with fewer than 255 elements, query on the following words in the Microsoft Knowledge Base:

insert AND table AND isam AND overflow



Code Example
The following program fragment demonstrates the problem. (The majority of the TYPE statement is left out for space reasons, and needs to be expanded from I4 to I250 as shown in a comment below). The &quot;Overflow&quot; error will occur on the OPEN statement at run time: TYPE BigType I1 AS INTEGER I2 AS INTEGER I3 AS INTEGER '...   ... I251 AS INTEGER I252 AS INTEGER I253 AS INTEGER I254 AS INTEGER I255 AS INTEGER END TYPE OPEN &quot;BigType&quot; FOR ISAM BigType &quot;BigType&quot; AS #1 'Overflow error here CLOSE To work around the problem, you can make TYPE BigType out of nested types, such as the following: TYPE NestType A AS INTEGER B AS INTEGER C AS INTEGER D AS INTEGER E AS INTEGER END TYPE

TYPE NewBigType I1 AS INTEGER I2 AS INTEGER I3 AS INTEGER '...   ... I248 AS INTEGER I249 AS INTEGER I250 AS INTEGER N AS NestType END TYPE

Additional query words: BasicCom

Keywords: KB62773

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.