0

Could you please provide me with a simple example of using the Filter Property of ADOQuery in Delphi 7?

Thanks.

none
  • 4,669
  • 14
  • 62
  • 102

1 Answers1

3

as looking into histroy question i got into this question:

Delphi ADO Query

which said by RRUZ that:

AdoQuery1.close;
AdoQuery1.filter := 'your condition goes here';
AdoQuery1.filtered := true;
AdoQuery1.Open;

Edit: or just :

AdoQuery1.filter := 'your condition goes here';
AdoQuery1.filtered := true;
Community
  • 1
  • 1
none
  • 4,669
  • 14
  • 62
  • 102
  • 3
    It is not necessary to close, set the filter and then open the query. Just set the condition (e.g. somefield=1) even on an open query and then Filtered := true;. – avenmore Oct 17 '10 at 21:35