DF_FILE_DISPLAY_NAME
See Also: Get_Attribute, Set_Attribute, DF_FILE_PHYSICAL_NAME
The table’s user-display name, as stored in the file-list file.
Level
Table
Supported by
All Drivers
Type
String, permanent
Access
Read / Write
Values
A string containing the table's user-display name.
Remarks
The display name can contain alphanumeric characters as well as ASCII characters above 32 and be up to 31 characters long. The display name is intended to be a phrase or description associated with a table and is typically used for prompts in tools (Database Explorer and so forth).
Unlike other permanent table-level attributes, the filelist attributes (DF_FILE_DISPLAY_NAME, DF_FILE_ROOT_NAME, and DF_FILE_LOGICAL_NAME) can be set outside of a Structure_Start ... Structure_End operation. These attributes are actually stored in the filelist and not in the database or table.
To add a table to an existing filelist, the three filelist attributes must be set at the same time. To remove a table from the filelist, the three filelist attributes must be set to an empty string.
Example Procedures
ShowFilelistNames
Procedure ShowFilelistNames
Handle hTable
String sRoot
String sDisplay
String sTable
Move 0 To hTable
Repeat
Get_Attribute DF_FILE_NEXT_USED Of hTable To hTable
If (hTable <> 0) Begin
Get_Attribute DF_FILE_ROOT_NAME Of hTable To sRoot
Get_Attribute DF_FILE_DISPLAY_NAME Of hTable To sDisplay
Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
Showln hTable ", " sRoot ", " sDisplay ", " sTable
End
Until (hTable = 0)
End_Procedure // ShowFilelistNames
The sample procedure above shows all the filelist attributes.
NewEntry
Procedure NewEntry Handle hTable String sRoot String sDisplay String sTable
Set_Attribute DF_FILE_ROOT_NAME Of hTable To sRoot
Set_Attribute DF_FILE_DISPLAY_NAME Of hTable To sDisplay
Set_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
End_Procedure // NewEntry
The sample procedure above creates a new filelist entry at a given slot. It can also be used to remove a filelist entry by passing empty strings for the three filelist attributes.
CreateNewFilelist
Procedure CreateNewFilelist String sNewList
Handle hoWorkspace
String sPath
Integer iMaxSlots
//*** Make sure new filelist goes into the first folder of datapath
Get phoWorkspace Of ghoApplication To hoWorkspace
Get psDataPath Of hoWorkspace To sPath
Get PathAtIndex Of hoWorkspace sPath 1 To sPath
If (Right(sPath, 1) <> Sysconf(Sysconf_Dir_Separator)) ;
Move (sPath - Sysconf(Sysconf_Dir_Separator)) To sPath
Move (sPath - sNewList) To sPath
//*** Create the disk file
Direct_Output sPath
Write "filelist.cfg"
Close_output
//*** Use the disk file as filelist
Set_attribute DF_FILELIST_NAME To sPath
//*** Create all the slots
Get_Attribute DF_NUMBER_FILES_SUPPORTED To iMaxSlots
Send NewEntry iMaxSlots "" "" ""
End_Procedure // CreateNewFilelist
The sample procedure above uses the filelist attributes to create a new empty filelist. It calls the NewEntry procedure defined above.