SET DATABASE Command

Example   See Also

Specifies the current database.

Syntax

SET DATABASE TO [DatabaseName]

Arguments

DatabaseName

Specifies the name of an open database to be made the current database. If you omit DatabaseName, no open database is made the current database.

Remarks

Many databases can be open at the same time, but only one can be the current database. Commands and functions that manipulate open databases, such as ADD TABLE and DBC( ), operate on the current database.

The current database can also be specified by choosing an open database from the Database drop-down list on the Standard toolbar.

Visual FoxPro may automatically open databases when a query or a Form is executed.

SET DATABASE is scoped to the current data session.