Board index » delphi » Result of TQuery in TMemo instead of TdbGrid

Result of TQuery in TMemo instead of TdbGrid

Hello,

I would like to know how it is done to get the results into a TMemo or a
TList without using the TdbGrid?

Any help is appreaciated

Thanks

Dany
e-mail : BEIP0...@ibm.net

 

Re:Result of TQuery in TMemo instead of TdbGrid


Daniel,

If your data source is a TQuery or TTable you could do something like this:

with query1 do
begin
    first;
    memo1.clear;
    repeat
        memo1.lines.add( FieldByName('fieldOfInterest').asString  {plus
other fields});
        next;
    until EOF;
end;

Quote
Daniel Kinnaer wrote:
> Hello,

> I would like to know how it is done to get the results into a TMemo or a
> TList without using the TdbGrid?

> Any help is appreaciated

> Thanks

> Dany
> e-mail : BEIP0...@ibm.net

Other Threads