<< Click to Display Table of Contents >> Navigation: Sources > array of T |
Any array of records or objects can be used as query source. Note, that elements in an array should be of the same type.
Query columns can reference public/published object fields, properties and methods. Methods can have parameters. Example:
type
TCustomer = class
public
CustomerID: integer;
Active: boolean;
Name, Address, City, Country, Email: string;
function OnSubscription(ADate: TDateTime): boolean;
end;
TCustArray = array of TCustomer;
var A: TCustArray;
THtSQL.FromArray(A, TypeInfo(TCustArray), 'select name, address, OnSubscription(CURRENT_DATE) from data order by name', []).ToDataset(FDMemTable1);