Increasing New Record Speed

Increasing Speed of Search for Deleted Records

By default VPM Enterprise recycles deleted records when creating a new record in a table. 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.

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 New toolbar 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/Manager. It is suggested that you also create an index based on the DELETED() function for tables you add to a project.        

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.

∑       To turn off recycling of deleted records for a table, select the table in the Data Builder/Manager and uncheck the Recycle Deleted Records checkbox on the Edit Ė Properties and Utilities page.

∑       To turn off recycling of deleted records for an entire application, open the PROAPP class of the PROAPP.VCX (located in the applicationís home directory) in the Visual FoxPro Class Designer. Set the lDoNotRecycleDeletedRecs property to .T..

∑       To turn off recycling of deleted records for all applications you create, open the VPMAPP class of the VPMAPP.VCX (located in the VPM Enterprise home directory) in the Visual FoxPro Class Designer. Set the lDoNotRecycleDeletedRecs property to .T..

Increasing Speed of Moving Between Fields

You can increase the speed at which a user can tab from field to field by doing the following:

∑       Field Validation

∑              If you donít need to validate a field, put an asterisk in the field controlís Valid method. This will prevent the default validation code from running in the control class Valid event.

∑       Field Security

∑              If you donít need Field Security for a field, in the Form Designer blank-out the cCSControlID property of the fieldís control.

Increasing Speed of Save Record

When a user saves a record that has been added on a form, the VPM Enterprise Audit Trail routine adds a record for every field on the form to the Audit Trail table. Consequently, the Audit Trail feature slows down the saving of an added record. You can increase the speed at which records are saved by doing one of the following:

∑       Turn off the Audit Trail for the Application

∑              If you donít need the Audit Trail for any forms in an application, you can turn it off on the Admin Tools form reached from the Security popup on the applicationís Admin menu.

∑       Turn off the Audit Trail for the Add Mode on Selected Forms

∑              If you need the Audit Trail for some forms but not for others, donít turn the Audit Trail off on the Admin Tools form. Turn off the Audit Trail for forms that donít need it by setting the formsí lNoNewAuditTrail property to .T..

Note: This does not turn off the Audit Trail for changes and deletions for a form. There are lNoDeleteAuditTrail and lNoNewAuditTrail properties that control the creation of Audit Trail records for those functions.

∑       Turn off the Audit Trail for Selected Fields

∑       If you need the Audit Trail for some fields on a form but not for others, you turn can off the Audit Trail for fields that donít need it by unchecking the fieldsí Audit Trail field property checkboxes in the applicationís Data Manager form.

More:

Increasing Delete Record Speed