Skip to content

Database Tables

A database table is declared within your DataFlex application using the Declare_DataFile command. The syntax of the Declare_DataFile command is:

Declare_DataFile {tablename}

Where:

  • {tablename} is the name of the table that you are declaring.

The Open command declares a table and then opens it in preparation for input/output operations. Since you would normally need to open any table before you use it, this command can be used as a substitute for Declare_DataFile. Examples of table declarations are:

Declare_DataFile Customer  // Declares a customer table
Open Invt                  // Declares an inventory table and opens it

Notes

Before you can declare and use a table within your program, you must connect to a database that contains that table. Refer to the Database Builder documentation for information about creating tables and connecting to databases.