If you want to close down all program operations and return Visual FoxPro to its interactive state, issue the following commands in order inside the Command window or in the program called just before you quit Visual FoxPro.
CLEAR ALL CLOSE ALL CLEAR PROGRAM
CLEAR ALL removes all objects from memory, which, in turn, closes all private data sessions and cursors.
CLOSE ALL, after CLEAR ALL has completed successfully, closes all databases, tables, and cursors in data session 1, the default Visual FoxPro data session.
CLEAR PROGRAM clears the compiled program buffer of the most recently executed programs. CLEAR PROGRAM forces Visual FoxPro to read the programs from disk, rather than from the program buffer.
Cleaning Up during TransactionsВ В В If transactions are in progress, use the END TRANSACTION Command for each level of transaction before issuing CLEAR ALL, CLOSE ALL, and CLEAR PROGRAM.
Cleaning Up during Buffered UpdatesВ В В If buffered updates are in progress, use either the TABLEUPDATE(В ) Function or TABLEREVERT(В ) Function for each cursor with buffered updates before issuing CLEAR ALL, CLOSE ALL, and CLEAR PROGRAM.