Condividi tramite


DISPLAY TABLES Command

Displays names and information about all the tables contained in the current database.

DISPLAY TABLES [TO PRINTER [PROMPT] | TO FILE FileName [ADDITIVE]] [NOCONSOLE]

Parameters

  • TO PRINTER [PROMPT]
    Directs output from DISPLAY TABLES to a printer.

    You can include PROMPT to display a Print dialog box before printing starts. Place the PROMPT keyword immediately after TO PRINTER.

  • TO FILE FileName
    Directs output from DISPLAY TABLES to the file specified with FileName. If the file already exists and SET SAFETY is ON, Visual FoxPro displays a prompt asking if you want to overwrite the file.

  • ADDITIVE
    Appends to the end of the named file. If you omit ADDITIVE, then the file is overwritten with the value of the expression.

  • NOCONSOLE
    Suppresses output to the main Visual FoxPro window or to the active user-defined window.

Remarks

The information returned is a subset of the information shown using DISPLAY STATUS. However, the information displayed using DISPLAY TABLES contains only table-related information and displays the information regardless of whether the tables are open or not.

The following information is displayed:

  • Table name

  • Table path

Example

The following example opens the customer table in the testdata database. DISPLAY TABLES is used to display information about the tables in the database.

CLOSE DATABASES
SET PATH TO (HOME(2) + 'Data\')   && Sets path to database
OPEN DATABASE testdata  && Open testdata database

CLEAR
DISPLAY TABLES  && Displays information about tables in the database

See Also

Reference

DISPLAY Command

ADD TABLE Command

CLOSE Commands

CREATE DATABASE Command

LIST TABLES Command

OPEN DATABASE Command

REMOVE TABLE Command

Other Resources

Commands (Visual FoxPro)

Language Reference (Visual FoxPro)