Maintaining File Lists

Each workspace maintains a central registry that lists all of the tables assigning a table number to each one. This is known as the DataFlex file list. The file list is located in a document named filelist.cfg in the workspace’s Data directory.

Database Builder provides several tools for maintaining and editing the file list. You can open a specific file list, create a new Filelist document, Save as, remove tables from the list, and move tables to a different table number.

Open Filelist

To open a different Filelist document than the standard filelist.cfg in the workspace’s Data directory, choose Open Filelist from the Filelist menu. This pops up the open-file dialog for opening a Filelist document. Use this dialog for finding the Filelist file to open.

Selecting a new file list changes the current file list throughout Database Builder. For example, the list of tables to open is determined by the current file list, so this function actually determines the operating scope of this tool.

Create Empty Filelist

To create a new Filelist document, choose Create Empty Filelist from the Filelist menu. This pops up the save-file dialog for creating a new Filelist document.

The new file list will be empty of registered tables regardless of whether there are tables that you have created in the workspace. The new file list will become the current table list throughout Database Builder.

Save Filelist as

To save a copy of the current table list under a different name, choose Save Filelist as… from the Filelist menu. This pops up the save-file dialog for saving the new Filelist document.

Remove Entry

To remove tables from the file list, choose Remove Entry from the Filelist menu. This pops up the table-selection panel. Select the tables to remove from the table list, then press Remove to remove them. Before any entry is removed, you will see a confirmation message, so you will always have an opportunity of changing your mind.

This choice does not delete any actual tables, just the Filelist entries.

New Entry

To create a new entry in the file list, choose New Entry from the Filelist menu. This pops up the Create New Filelist Entry panel.

The next available table number in the list will appear by default, but you can change that if you wish.

Enter a file name. The file name you enter will be repeated for your convenience in the User Display Name and DataFlex Name windows, but you can change those if you wish. Press OK to add the entry to the current file list.

This process does not create any tables; it just adds the entry for a table into the current file list. It also does not check for duplicate names, since this might be what you want.

Related Topics

Connecting with Other Database Systems

 

Edit Entry

To edit the table information in the filelist, choose Edit Entry from the Filelist menu. This pops up the table-selection panel. Use this panel to select the tables that you want to edit, then press the Edit button. This now pops up the Edit Filelist Entry panel for each table you selected.

The selection cursor bypasses the table number, since that is what you are working on; it cannot be changed from this list. All other information on the panel can be edited.

File Name

The present file name is shown, and you may edit it in any way you wish, including adding an explicit drive and path. If you change the file name to a value that does not indicate the actual location of the tables in the directory, programs may not be able to use such tables.

User Display Name

The present user-display name is shown, and you may edit it in any way you wish. This will affect its display in various DataFlex tools such as Database Explorer.

DataFlex Name

The present DataFlex name is shown, and you may edit it in any way you wish. Be aware, however, that if you change the DataFlex name, and the old name appears in the source code of a program being compiled, the program will be unable to compile, or may even find the wrong table.

 

Move Entry

To move tables in the file list from one table number to another, choose Move Entry from the Filelist menu. This pops up the table-selection panel. Use this panel to select the tables that you want to move, then press the Move button. This now pops up the Move Filelist Entry panel for each table you selected.

The number of the table to be moved (the "source table") is shown in the Source form. Enter the number that you want to move the table to in the Destination and press OK to accept.

You should be aware (you will see a warning), that if you change the table number, but do not change the .FD file, programs already compiled that reference that table will no longer find it. If you subsequently move another table to this number, or create a new one under it, there are likely to be unwanted effects in your program (if it runs at all).

To overcome this problem, you should output new .FD files for each table that was moved then re-compile your applications.

 

Related Topics

Outputting DEF Files

File Extensions

 

See Also

Database Maintenance