Thanks for reply. I'm importing into a database a very large text file (nearly 1GB). The file is so large that in order to refresh the database table with a new set of data (replacing old data), which is again a very large text file, I have to either delete the table or delete all of its records, do a compaction, close the database, reopen it, and restart the import. I'm trying to make this import fail proof and one way I thought of doing that was to set a flag that said that the database had been compacted and is ready for import. I can't check for non-table-existence or zero record counts because some error conditions (e.g., no table do to previous import failure) would give me a false go-ahead status. Difficult to explain, but the 'status flag' might be one way to 'gate' me through the import or block the import and force a db compact, closure, and restart.