Add Existing Table
Use the Add Existing Table dialog to add a pre-existing database table to the current workspace's registry of database tables (the FileList). This will also create an up-to-date .FD file for the table.
Normally, you will not need to do this. Tables are added to the FileList automatically when they are created in the Studio or when you connect to an existing table in an SQL database.
Moving Tables
This dialog can also be used to move a table from one FileList position to another. Use the Remove Table option to remove the table from the old FileList slot and then use the Add Existing Table to move it to a new slot.
Data Entry
File Name
Enter the name and full path of the file that stores the definitions needed to use the table in a DataFlex application. The name of this file will vary depending on which database driver is associated with the table you are registering. The file that you select here will be used to automatically fill out the rest of the form.
- For the embedded database, the filename will have a
.datextension. - For SQL databases, the file will have a
.intextension.
The file will be located in the workspace's Data path.
Click the prompt button to activate the Windows Open file dialog. Use this to select the correct file for this File Name.
Root Name
Enter a root name. The Root Name is used by the system to know how to reference the table when it needs to be opened. When you select a File Name in the previous text box, the Root Name is defaulted to the correct root name required to open the table.
Root Names for the embedded database and each type of SQL database will differ.
The Root Name refers to the file name (above), excluding the file extension. If the root file is located in the workspace's data path, then you should not include the path information. If it is not in the Data path, then include the path information to locate the root file. The root name and path cannot exceed 40 characters in total.
If the table belongs to an SQL database, then special modifiers can be added to the root name to specify the type of driver.
Normally, you will not edit this value, as it is better to accept the defaults that are entered for you in this dialog. Refer to your database driver documentation for specific information.
Table Number
Assign a table number for the table you are adding to the FileList. DataFlex applications use the table number to find the table's FileList entry.
For the embedded database, the table number also determines the locking order for any group of tables that need to be locked. This ensures that tables are always locked in the same order.
You are prompted with the lowest unused table number. You can accept the default or choose a different number. Click the search icon on the right to increment the suggested table number to the next higher unused table number.
Table Name
Enter the name that you will use in your source code to reference the table. The suggested name will be the same as the File Name without the path and extension. Normally, you can select this name.
The Table Name has a limit of eight characters. If the name portion of the file name is too long, you will need to enter a shorter name.
If you are making a reference for an alias table, then you will assign a different table name than that used by the master alias. This is the name you will use in your application source code to reference the alias table.
OK
Click OK to make the new FileList entry and create a new .FD file for the specified table.
Cancel
Click Cancel to close this dialog without registering any changes.