Hello.
Can you tell me, what is the fastest way to search for a specific dataitem value.
Lets say I have invoices and invoice positions in a dataitem and want to find all invoiceppositions for invoice xy?
Should I use filters or queries?
Or is any of the possibilites as fast as the other?
Thanks.
Fastest way to search in a dataitem
Re: Fastest way to search in a dataitem
Hello,
I'd use a Query with a Filter as in the Speed example:
I'd use a Query with a Filter as in the Speed example:
Code: Select all
procedure TBISpeedTest.SQL1_Proc;
var Query : TDataSelect;
Alex : TDataItem;
begin
Query:=TDataSelect.Create(nil);
try
Query.Add(Persons); // * all fields
Query.Filter:=TDataFilter.FromString(Persons,'Name="Alex"');
// Execute Query and after that, just destroy results
Alex:=Query.Calculate;
Alex.Free;
finally
Query.Free;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Fastest way to search in a dataitem
Ok.
Thanks Yeray.
Thanks Yeray.