Re: TADODataset.Filter?



............
One thing you should do is DisableControls and after updating the Filter
then EnableControls
so the DbGrid will then refresh itself.

ADODataSet1.DisableControls;
ADODataSet1.Filtered := false;
ADODataSet1.Filter := 'LastName Like ' + QuotedStr('Fu*'); //Fuller
ADODataSet1.Filtered := true;
ADODataSet1.EnableControls;

I haven't gotten around to testing today after all. But what you write
here is really interesting. I would definitely not be surprised if
DisableControls and EnableControls is the clue to my filter problems!
(I understand that I depended upon DBGrid to update itself automatically
on changes in TADODataset filtering).

I tried this today but regret to report that it made no difference?

Singlestepping through my application revealed the following
sequence of events:

1: edFiltermaskChange is invoked in response to a
change in the filter specification.in the edit box
2: ADODataset1.DisableControls
3: ADODataset1.Filtered := false
4: ADODataset1AfterScroll is invoked, apparently in
response to the Filtered property being changed.
5: There is no change in current record
6: Back in edFiltermaskChange ADODataset1.filter is updated
7: ADODataset1.Filtered := true
8: ADODataset1AfterScroll is invoked, apparently in
response to the Filtered property being changed.
9: There is no change in current record
10: ADODataset1.EnableControls
11: Exit from edFiltermaskChange

The display in DBGrid is unchanged (no effect of filtering)

I feel annoyed at myself as I cannot get this to function?

regards Sven


.



Relevant Pages

  • Re: TADODataset.Filter?
    ... so the DbGrid will then refresh itself. ... DisableControls and EnableControls is the clue to my filter problems! ...
    (borland.public.delphi.database.ado)
  • Re: Free download spectral analyser.
    ... suite for measuring speaker response in-room. ... and the filter I built is an opamp with bridged RC T filter in the NFB ... Si I have 33 rest F for the whole audio band and I find it ... many speakers I test after working on them have large unwanted response ...
    (rec.audio.tubes)
  • Re: Free download spectral analyser.
    ... suite for measuring speaker response in-room. ... that will be good for most of the audio programs and tests (good S/N, IMD, ... and the filter I built is an opamp with bridged RC T filter in the NFB ... But to facilitate the measuring process, ...
    (rec.audio.tubes)
  • Re: Cassini: where are colors and detail?
    ... While one filter response may be dropping as you change ... Algorithms in consumer cameras for interpreting Bayer sensors also go ... have to do spectrometry using a Bayer filtered CCD as the sensor. ...
    (sci.astro.amateur)
  • Re: Cassini: where are colors and detail?
    ... While one filter response may be dropping as you change ... > monochromatic light with classic Bayer filter arrays. ... You confuse cheap consumer digital camera problems with bayer sensor ...
    (sci.astro.amateur)