Make_File

See Also: Open, Set_Attribute, Structure_Start, Zerofile

Purpose

To create a new, empty database table, or to modify the structure of an existing one.

.DEF files are designed to work with the embedded database. We recommend using the native tools of the database you are working with to maintain table definitions.

Syntax

Make_File {def-root-name} [{path} [{table-number}]] [{driver-name}

Argument Explanation

Def_root_name The root name (without the .DEF extension, but with drive designator and subfolder path if necessary) of an ASCII source definition file produced by Output_Aux_File.

Path An optional path or drive designator which specifies where the new table is to be created. It must end in the operating system delimiter (e.g., \).

File_number An optional integer which specifies the table number to be used in FILELIST.CFG for the new table (if different from that contained in the .DEF file). This option may be used only if a path is specified.

Driver_name An optional database-driver name. If you wish the created table to be in the format of another database driver, you can specify it through this parameter.

What It Does

Make_file allows a running DataFlex program to read a file definition from an ASCII source definition (.DEF) file created using Output_Aux_File and create a new, empty database table having the same specifications, or modify an existing table to match the specifications in the .DEF.

Options of make_file permit use of a definition source file on another drive and subfolder, and permit specification of a different filelist number from that contained in the source definition file.

Example

make_file "vanilla" "\dataflex\mydata\"  99

This reads a database table definition from File VANILLA.DEF in the current folder, and creates a database file in folder \dataflex\mydata, assigned to table 99.

Notes