The Table_GetAutoShrinkMode() function indicates whether the current database manager is capable of conducting a table shrink using Table_AutoShrink() or rebuilding a table’s indexes using Table_RebuildIndexes(). Currently, these functions can be used with c-tree and Pervasive.SQL tables.
Table_GetAutoShrinkMode(table table_name)
• table table_name – The table that’s being shrunk.
An integer indicating whether the automatic shrink can take place.
If a zero is returned, an automatic shrink can take place using Table_AutoShrink().
If a non-zero value is returned, the table can’t be shrunk automatically. The Table_StartShrink(), Table_VerifyRecord(), Table_EndShrink() and Table_CopyShrinkRecords() functions must be used to shrink the table instead. Non-zero values will be returned if a database manager-specific error occurred, if the database manager used by the named table doesn’t support automatic table shrinks, or if the defaults file contains the CTShrink = FALSE setting. Consult the documentation for your database manager for a list of error codes for that database manager.
Shrinking is the process of removing unused space from a data table. The removal of unused space in this manner is called a “shrink” because the file will invariably be smaller after the unused space is removed.
You must close the table before using Table_GetAutoShrinkMode().
If the CTShrink setting is included in the defaults file and is set to FALSE, the Table_GetAutoShrinkMode() function will always return a non-zero value, regardless of the database manager used by the named table.