Partager via


DISPLAY DATABASE Command

Displays information about the current database or fields, named connections, tables, or views in the current database.

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

Parameters

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

    In Visual FoxPro, you can include the optional PROMPT clause to display a Print dialog box before printing starts. Place PROMPT immediately after TO PRINTER.

  • TO FILE FileName
    Directs output from DISPLAY DATABASE 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

Use DBGETPROP( ) to return additional information about the current database.

Example

The following example creates a database named people. A table named friends is created and is automatically added to the database. DISPLAY TABLES is used to display the tables in the database, and DISPLAY DATABASES is used to display information about the tables in the database.

CREATE DATABASE people
CREATE TABLE friends (FirstName C(20), LastName C(20))
CLEAR
DISPLAY TABLES  && Displays tables in the database
DISPLAY DATABASES  && Displays table information

See Also

LIST DATABASE | DELETE DATABASE Command | DISPLAY FILES Command