Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Filtered State?
Thu, Jun 6 2019 2:48 AMPermanent Link

Ian Branch

Avatar

Hi Team,
I have been playing with the Konopka & now LMD StatusBar components.
They both have a DBState panel that reflects the current 'State' of the associated Table.  e.g. Browse, Insert, Edit & Filtered.
I have tried both DBISAM & EDB and both reflect Browse, Insert & Edit, bit neither reflect Filtered.
The respective panels connect to the DataSource.
Is there some difference in what 'normal' Tables send for Filtered v what DBISAM & EDB send?
One of the downfalls of committing to EDB with DBISAM on the side is that I have no other Database types I can test with/on. Frown

Regards,
Ian
Thu, Jun 6 2019 4:52 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Ian


What you can always do, if you have it, is look at Delphi's source.

Looking in DBTables in function TBDEDataSet.LocateRecord I find

SetTempState(dsFilter);

The only other reference I can find is in constructor TBlobStream.Create which is

 if FDataSet.State = dsFilter then
   DatabaseErrorFmt(SNoFieldAccess, [FField.DisplayName], FDataSet);

so my guess is that dsFilter is a bit like dsCalcFields - short term only existing whilst the filter is being set.

That makes sense since otherwise table.state would have to be able to reflect multiple states simultaneously. Maybe your components don't reflect the state changes quickly enough, or you blinked? <VBG>

You could try using a TDatasource and its OnStateChange event although bearing in mind the fact that I can only find it being called with SetTempState I'm doubtful.

Later on I'm going to have a look and see if there's an event in TDataset I can hang an OnFilterChanged event off. It would be useful to me as well.

Roy Lambert
Image