Methods of Accessing Tables

Internally, DataFlex uses three different names for each table, each having a distinct purpose.

Directory Path/Rootname

The directory path/rootname of a table is what the operating system uses to locate the physical fileset that makes up the table. If a directory path/rootname contains a path from the root directory, an operating system directory command would list the files. If the directory path/rootname contains only the file rootname common to all the directory files of the fileset, DataFlex uses the value of the DataPath registry key to find the fileset. It searches each directory identified in the value of Data in the order in which they are listed until the fileset is found.

User Name

This name is the one displayed by the Table Editor and others that display data from the file list. With a capacity of 40 characters, it is intended for displaying a good description of the table, its use, its contents, originator, owner, or whatever information may help users who are looking for it to identify it. With the filelist command, you can display this name from your own programs.

If you begin the User name with an at sign (@), it will not display in tools, and will not be selectable.

DataFlex Name

This form of a table's name is for use in programs, for such commands as open, close, relate, attach, save, saverecord, clear, and zerofile. It is also used with a period and column names for addressing database elements in programs. It need not bear any resemblance whatsoever to its rootname, but the default action of creating a new table will make them the same unless you change it. With its independence from the rootname, it is independent of operating systems using different syntaxes for rootnames, preserving the transportability of DataFlex programs.

See Also

The Filelist

Database Essentials