vbdpss.hlp (Table of Contents; Topic list)
Article Q61485
                                                 Contents  Index  Back
─────────────────────────────────────────────────────────────────────────────
                           Knowledge Base Contents  Knowledge Base Index
 
 VB for MS-DOS: Maximum Number of ISAM Files Open at One Time - Q61485
 
 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, an error 67 "Too many files."
 is returned.
 
 A database file in the Professional Edition of Microsoft Visual
 Basic version 1.0 for MS-DOS 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.
 
 More Information:
 
 The ISAM engine in Microsoft Visual Basic for MS-DOS 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 "Visual Basic for
 MS-DOS Professional Edition Features" manual for version 1.00.