CREATE DATABASE Command

Example   See Also

Creates a database and opens it.

Syntax

CREATE DATABASE [DatabaseName | ?]

Arguments

DatabaseName

Specifies the name of the database to create.

If SAFETY is set to ON and the database name you specify has the same path and name as an existing database, Visual FoxPro displays a warning dialog box that prompts you to specify a new path or name for the database.

?

Displays the Create dialog box from which you can specify the name of the database to create.

Remarks

A database file has a .dbc extension. The associated database memo files have a .dct extension, and the associated index files have a .dcx extension.

The database is opened exclusively, regardless of the setting of SET EXCLUSIVE. Because CREATE DATABASE opens the database after it has been created, you do not have to issue a subsequent OPEN DATABASE command.

If CREATE DATABASE is issued without any of its optional arguments, the Create dialog box is displayed, allowing you to specify a name for the database.