Microsoft KB Archive/61485

= Maximum Number of ISAM Files Open at One Time in VB for MS-DOS =

Article ID: 61485

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft Visual Basic for MS-DOS
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q61485



SUMMARY
The number of ISAM tables that you can have open at one time is determined by the number of database files that you have open. (See table below for more information.)

The maximum number of database files that you can have open at one time is 4 files. However, this is not the maximum number of tables you can have open at one time. The maximum number of tables that you can have open at one time is 13 tables in 1 database file, 10 tables in 2 database files, 7 tables in 3 database files, or 4 tables in 4 database files.

If you attempt to open more than the maximum allowed number of tables or database files at one time, error 67, &quot;Too many files&quot; is returned.

A database file in the Professional Edition of Microsoft Visual Basic for MS-DOS, version 1.0; or in Microsoft Basic Professional Development System (PDS) for MS-DOS, versions 7.0 or 7.1 is created with the default extension .MDB and contains the physical data for each table plus the indexes used to define and point to the data.

The information in this article is included with the Help file provided with the Professional Edition of Microsoft Visual Basic for MS-DOS, version 1.0.



MORE INFORMATION
The ISAM engine in Microsoft Visual Basic for MS-DOS, version 1.0 and Microsoft Basic PDS for MS-DOS, versions 7.0 and 7.1 has a maximum number of 16 pointers or ISAM handles that it can use with ISAM files. These are NOT the same as MS-DOS file handles.

Each file still takes one MS-DOS file handle for its first open, but it does not need any additional MS-DOS file handles for additional tables opened in the same database file.

Each database file takes four ISAM handles on its initial open: one handle for the file, one for the indexes, one for the data, and one for the initial table. Each additional table referenced in an already opened database takes only one additional ISAM handle and no more MS-DOS handles. This is because ISAM handles that point to the same file, indexes, and data already exist.

As a result, the number of tables that you can have open at one time is determined by the number of database files you are using. The following table lists the combinations of databases (.MDBs) and additional ISAM tables that you can have open at one time:            Maximum Number of ISAM Files and Tables

-  # of .MDBs (files):  |    1         2        3        4 |  # of additional      | tables in already   |    12        8        4        0 opened .MDBs:       | |  Total tables:        |    13        10       7        4 |                       |   Total ISAM handles:  |    16        16       16       16 - Therefore, if you have all of your tables in only 1 database file, you can open a total of 13 tables at one time. However, if you open tables in 4 database files, you can only open those 4 tables at one time.

This information is taken from Page 145 of the &quot;Microsoft Visual Basic for MS-DOS Professional Edition Features&quot; manual for version 1.0; and from Page 388 (Chapter 10, &quot;Database Programming with ISAM&quot;) of the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; for versions 7.0 and 7.1.

Additional query words: VBmsdos BasicCom 1.00 7.00 7.10

Keywords: KB61485

-

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

© Microsoft Corporation. All rights reserved.