Specifies the level of table validation to perform. Use SET TABLEVALIDATE when you want a lower level of table integrity checking than the default setting.
|You must first open the table exclusively before using the SET TABLEVALIDATE command.|
SET TABLEVALIDATE TO [nLevel]
Specifies the level of table validation as the sum of the bit values.
The following table describes the bits and bit values that you can add to obtain a setting for nLevel.
Note: The default setting for nLevel is 3. Bit number Bit value (additive) Description
Do not perform table validation.
Validate record count when opening a table.
Note: The table (.dbf) header is locked during validation. This operation can result decreased scalability when tables open as shared, for example, when issuing the USE command with the SHARED keyword or calling the SQL SELECT, UPDATE, INSERT, or DELETE commands against a closed table, and SET EXCLUSIVE is set to OFF.
Validate record count when appending or inserting records and writing them to disk.
Suppress "File is in use (Error 3)" if table header cannot be locked when opening the table. Requires setting the first bit to validate record count when opening a table.
Note: When opening a table, the USE command attempts to lock the table header only once. If the header is locked, Visual FoxPro performs a strict header check, similar to SET TABLEVALIDATE set to 1. Otherwise, Visual FoxPro suppresses the "File is in use" error and performs a header check in the manner of versions prior to Visual FoxPro 8.0.
Check .dbf header before saving append operation to disk and modifying header.
SET TABLEVALIDATE does not have repair functionality; it performs only integrity checks as specified by nLevel.
SET TABLEVALIDATE does not perform table validation on temporary files or cursors.
You can set SET TABLEVALIDATE in Config.fpw as follows:
TABLEVALIDATE = nLevel
If a table opens exclusively, and SET TABLEVALIDATE is set to 8 or greater, the setting is disregarded.