KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Performing a partial database verification
PRODUCT: 4D | VERSION: 12 | PLATFORM: Mac & Win
Published On: July 11, 2011

It is now possible to run a partial verification of the data file and or indexes. A partial verify can be performed from the MSC or via code. Here are the instructions for using each method:

  1. MSC
    Here are the steps for performing a partial Verify from the MSC:
    • open the MSC
    • go to the Verify tab
    • click the Table List button
    • click the Deselect All button
    • click on the arrows to expand the tables which contain the data and or indexes to be checked
    • select the specific data and or indexes to be verified
    • click the Verify button

  2. Code
    A partial verify can be performed programmatically using the VERIFY CURRENT DATA FILE command. There are options to verify only data, only indexes, or both. The command also accepts optional parameters for only verifying data or indexes from specific fields.

    Here is a simple example of how to use the command to verify only 4 indexes:

    Here is the method that sets up the parameters and calls the VERIFY CURRENT DATA FILE command. In this case 4 indexes are checked.

    ARRAY LONGINT(tablesArray;0)
    ARRAY LONGINT(fieldsArray;2;0)

    fieldsArray{1}{0}:=3 //table number to check
    APPEND TO ARRAY(fieldsArray{1};2) //field to check
    APPEND TO ARRAY(fieldsArray{1};4) //field to check

    fieldsArray{2}{0}:=12 //table number to check
    APPEND TO ARRAY(fieldsArray{2};6) //field to check
    APPEND TO ARRAY(fieldsArray{2};7) //field to check

    VERIFY CURRENT DATA FILE(Verify Indexes;0;"";tablesArray;fieldsArray)


    Note - for complete details, see the Language Reference page for the VERIFY CURRENT DATA FILE command.