By default VPM Enterprise recycles deleted records when tables (not views or CursorAdapters) are edited on forms. That means that when a user adds a record to a table on a form, VPM Enterprise attempts to find a deleted record to reuse for the new record. Recycling deleted records helps keep the number of deleted records in a table to a minimum and avoids the need to frequently PACK a table.
Deleted() Function Index
For large tables with many thousands of records, it can take some time for VPM Enterprise to find a deleted record after a user clicks the Add button. However, if you create an index for a table based on the DELETED() function, you will optimize the speed at which VPM Enterprise finds deleted records. VPM Enterprise automatically creates a DELETED() index tag when you create a new table in the Data Builder. We recommend that you also create an index based on the DELETED() function for tables you add to a project.
How to Turn Off Recycling Deleted Records
If your table is so large that even using an index based on the DELETED() function doesn’t speed up the search for deleted records enough, you can turn off the recycling of deleted records.
· For a Table: To turn off recycling of deleted records for a table, select the table in the Data Builder and uncheck the Recycle Deleted Records check box on the table’s Edit page.
· For an Application: To turn off recycling of deleted records for an entire application, open the PRODATAHANDLER class of the PRODATAHANDLER.VCX (located in the application’s home directory) in the Visual FoxPro Class Designer. Set the lDoNotRecycleDeletedRecs to .T..
· For All Applications: To turn off recycling of deleted records for all applications you create, open the VPMDATAHANDLER or DEVDATAHANDLER class of the VPMDATAHANDLER.VCX or DEVDATAHANDLER.VCX (located in the VPME home directory) in the Visual FoxPro Class Designer. Set the lDoNotRecycleDeletedRecs property to .T.