CompactGDB(path, mode, pages)

Reorganizes GDB. After reorganization, GDB is closed and is not added to the GDBEngine::GeoDatabases collection. The path argument is a string that specifies the path and GDB file name (without filename extension). The mode argument is a constant that specifies GDB reorganization mode:

Constant

GDB reorganization mode

gdbCompactKeepISN

Internal numbers stay unchangeable after reorganization.

gdbCompactNoKeepISN

Internal numbers may change after reorganization. This reorganization mode eliminates GDB degradation better than the previous one.

The pages argument is an integer array that specifies page sizes of ASS and DAT files. The pages array elements may have the following values:

1

Page size of ASS file for definition database

2

Page size of DAT file for definition database

3

Page size of ASS file for table database

4

Page size of DAT file for table database

5

Page size of ASS file for map database

6

Page size of DAT file for map database

If the pages argument is a Null value then file page sizes are not changed during reorganization. Page sizes influence the maximum size of GDB file (the maximum size of GDB file in bytes = page size * 32767) and performance. It is recommended to use the minimum page sizes that provide necessary sizes of GDB files.

NOTE. Since the change file is not used while reorganizing GDB, it will be incompatible with GDB after reorganization. To prevent such situation, record all modifications from the change file to GDB by the GDBEngine::ConsolidateGDB method before reorganization.