Populates a Table control programmatically with the records from a data file, HFSQL view or query (query created in the query editor or with
HExecuteSQLQuery).
The Table control populated programmatically must contain the columns to be bound to the items. FileToMemoryTable will:
- clear the Table control.
- bind the columns of the Table control to the items of a data file, HFSQL view or query. The items will be bound according to the logical order defined in the file.
- populate the Table control with the data from a data file or query.
CAUTION: This operation may take quite a long time and it may overflow the memory if the data file is very large.
// Populate TABLE_MyTable with the data from QRY_Query1
FileToMemoryTable(TABLE_MyTable, QRY_Query1)
Syntax
FileToMemoryTable(<Table control> , <Data file>)
<Table control>: Control name
Name of the Table control to be populated.
<Data file>: Character string
Name of data file, HFSQL view or query used.
Remarks
The different types of queries
FileToMemoryTable can be used with the queries created in the query editor or by
HExecuteSQLQuery.
To associate a query created by
SQLExec with a Table control populated programmatically, use
SQLTable.
The data file is browsed through according to the content of the
BrowsedItem property.
In order for FileToMemoryTable to take into account the filter applied to the data file, you must:
- Assign the item returned by HFilter to the BrowsedItem property.
- Use FileToMemoryTable.
FileToMemoryTable function and New property
FileToMemoryTable sets the
New property to
True.