View Revisions: Issue #25052

Summary 0025052: TSQLQuery.Filter produces issues with TDBGrid
Revision 2013-09-20 18:55 by Reinier Olislagers
Description Connect a TSQLQuery to a TDBGrid. Apply a TSQLQuery.Filter, then using the DBGrid vertical scroll bar to navigate through the records. Eventually you will hit a "Could not find the requested record".

I apologise, but I've been unable to get debugging inside FCL working, so I can't work out what's going on. The exception is being raised inside procedure TCustomBufDataset.SetRecNo(Value: Longint); I only know this as this is one of only places the exception gets raised, and the other location is apparently irrelevant.

This issue appears to be related to some other open issues relating to TSQLQuery.RecordCount (http://bugs.freepascal.org/view.php?id=12238). I'm not adding this report to that issue because I agree with the assessment there that RecordCount shouldn't be updated automatically. It can be an expensive call sometimes...

Other than that small clue, I've no idea what's going on.

This issue has been confirmed with connections back to MySQL, SQLite and MS SQL, so appears to be database engine independent.

I have only tested this under Windows 8 64bit.
Revision 2013-09-19 07:31 by Mike Thompson
Description Connect a TSQLQuery to a TDBGrid. Apply a TSQLFilter.Query, then using the DBGrid vertical scroll bar to navigate through the records. Eventually you will hit a "Could not find the requested record".

I apologise, but I've been unable to get debugging inside FCL working, so I can't work out what's going on. The exception is being raised inside procedure TCustomBufDataset.SetRecNo(Value: Longint); I only know this as this is one of only places the exception gets raised, and the other location is apparently irrelevant.

This issue appears to be related to some other open issues relating to TSQLQuery.RecordCount (http://bugs.freepascal.org/view.php?id=12238). I'm not adding this report to that issue because I agree with the assessment there that RecordCount shouldn't be updated automatically. It can be an expensive call sometimes...

Other than that small clue, I've no idea what's going on.

This issue has been confirmed with connections back to MySQL, SQLite and MS SQL, so appears to be database engine independent.

I have only tested this under Windows 8 64bit.