Megosztás a következőn keresztül:


DISPLAY CONNECTIONS Command

Displays information about the named connections in the current database.

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

Parameters

  • TO PRINTER [PROMPT]
    Directs output from DISPLAY CONNECTIONS 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 CONNECTIONS 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

DISPLAY CONNECTIONS displays the connection names, datasource, and connection string in the current database. Use DBGETPROP( ) to return additional information about connections in the current database.

Example

The following example assumes an ODBC data source called MyFoxSQLNT is available. The testdata database is opened, and a connection named Myconn is created. DISPLAY CONNECTIONS is used to display the named connections in the database.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'data\testdata')

CREATE CONNECTION Myconn DATASOURCE "MyFoxSQLNT" USERID "<userid>" PASSWORD "<password>"
CLEAR
DISPLAY CONNECTIONS     && Displays named connections in the database

See Also

CREATE CONNECTION | DELETE CONNECTION | DBGETPROP( ) | LIST CONNECTIONS | RENAME CONNECTION