Text Files
Apart from storing data in databases or variables, it is also possible to use textfiles for this purpose. By using these external files as data objects, it is very easy to reuse the same data source (ASCII file) in multiple (external) programs.
Once a file has been linked to an object, this file can be used in combination with an available file layout to use
it as a data object.
In AMT you can use these "datafile objects" either with the READFILE command (which is the most easy to use but
also has some limitations) or by assigning or requesting the available functions and properties. Please note the (safety) precautions, before applying data files to your program.
If you want to display all data that is stored in a text file, it is likely that you use a memo-, listbox- or combobox.
Records that are specified in a list- or comboboxfile always need to contain an item name to be displayed inside the item and a value that is internally used inside the application. There are two special LION commands available for filling this kind of files through your code:
- FILLBOX; to fill the box item without specifying a text file (file will be created automatically).
- ATTACHTOBOX: to specify the file that must be used for filling the box item.