Export (0) Print
Expand All
Expand Minimize
3 out of 4 rated this helpful - Rate this topic

SET TABLEVALIDATE Command

Visual Studio 2005

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.


SET TABLEVALIDATE TO [nLevel]

Parameters

nLevel

Specifies the level of table validation as the sum of the bit values.

NoteNote

The default setting for nLevel is 3.

The following table describes the bits and bit values that you can add to obtain a setting for nLevel.

Bit number Bit value (additive) Description

0

0

Do not perform table validation.

0

1

Validate record count when opening a table.

NoteNote

The table (.dbf) header is locked during validation. This operation can result in 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.

1

2

Validate record count when appending or inserting records and writing them to disk.

2

4

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.

NoteNote

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.

3

8

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.