VALIDATE DATABASE Command

Example   See Also

Ensures that the locations of tables and indexes in the current database are correct.

Syntax

VALIDATE DATABASE
  [RECOVER]
  [NOCONSOLE]
  [TO PRINTER [PROMPT] | TO FILE FileName]

Arguments

RECOVER

Displays dialogs that allow you to locate tables and indexes that are not in the locations contained in the database. VALIDATE DATABASE RECOVER must be issued in the Command window; issuing VALIDATE DATABASE RECOVER within a program generates an error message.

NOCONSOLE

Suppresses error message output to the main Visual FoxPro window or to the active user-defined window.

TO PRINTER [PROMPT]

Directs error message output from VALIDATE DATABASE to a printer.

PROMPT displays a Print dialog box before printing starts. Place the PROMPT keyword immediately after TO PRINTER.

TO FILE FileName

Directs error message output to the file specified with FileName. If the file already exists and SET SAFETY is ON, you are asked if you want to overwrite the file.

Remarks

VALIDATE DATABASE ensures that the database contains the proper locations of tables and indexes, that tables in the database contain the proper fields, and that index tags in the database exist.

VALIDATE DATABASE operates on the current database. The database must be opened for exclusive use by including the EXCLUSIVE keyword when you issue OPEN DATABASE.