Declare_Datafile

See Also: Open

Purpose

To declare the definition of a database table available for use in programs.

Syntax

Declare_Datafile {tableName}

Where {tableName} is the DataFlex Name of a database table. {tableName} cannot contain a path; only a table name.

What It Does

Declare_Datafile includes the .FD for the named file and defines any related symbols (e.g., FILE.FILE_NUMBER). Declare_DataFile allows the file to be used in your program code before it is open.

Example

Declare_DataFile Customer

 

Object oMyObject is an cObject

    Procedure Close_File

       // Without Declare_DataFile, the next line would not compile.

        Close Customer

    End_Procedure

 

    Procedure Open_File

        Open Customer

    End_Procedure

End_Object

Notes