View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0025052||Lazarus||Database Components||public||2013-09-19 07:31||2014-09-26 13:28|
|Reporter||Mike Thompson||Assigned To||Jesus Reyes|
|Platform||Windows||OS||Windows 8||OS Version||64 bit|
|Product Version||1.0.12||Product Build|
|Target Version||1.2.0||Fixed in Version||1.1 (SVN)|
|Summary||0025052: TSQLQuery.Filter produces issues with TDBGrid|
|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.
|Steps To Reproduce||Run the attached project (win 32 only I'm afraid). (I've included a compiled exe and the required SQLite dll)|
Click btnConnect once.
Click btnAddRecords twice (each time adds 10,000 records).
Try to scroll the DBGrid using the vertical scrollbar (grab the thumb, drag to a new position and let go.) Dragging may work a few times, but you'll eventually hit the problem (obviously when you finally end up on a record that the DBGrid thinks is still in the TDataset, but which the TDataset has filtered out).
|Additional Information||Originally reported over a year ago in the forums (http://forum.lazarus.freepascal.org/index.php/topic,17615.0.html). We got sidetracked in the discussions there though...|
|Tags||No tags attached.|
|Fixed in Revision||39124|
DBGrid_Error.7z (881,989 bytes)
Typo in Description, and I can't work out how to edit the Issue :-(
Apply a TSQLFilter.Query
Apply a TSQLQuery.Filter
Edit: Reinier Olislagers: bug reporters don't have permissions to edit the issue. I've applied your change. Thanks.
||I think the issue may be more directly related to the TDBGrid component (and derivatives) itself. For example, TKDBGrid does not seem to have this issue as it is a complete re-implementation/re-imagining of the DBGrid component concept which does not derive from TDBGrid.|
As discussed in the forum topic (http://forum.lazarus.freepascal.org/index.php/topic,17615.0.html, this issue has been resolved. And in fact, it was resolved in rev 39124, back in October last year (so, shortly after the topic was posted in the forum).
I could swear that I had tested this with 1.0.12. I'm sorry for wasting peoples time :-(
This issue can now be closed.
|2013-09-19 07:31||Mike Thompson||New Issue|
|2013-09-19 07:31||Mike Thompson||File Added: DBGrid_Error.7z|
|2013-09-19 07:34||Mike Thompson||Note Added: 0070181|
|2013-09-20 18:25||John Whitten||Note Added: 0070214|
||Description Updated||View Revisions|
||Note Edited: 0070181||View Revisions|
|2013-09-24 02:09||Mike Thompson||Note Added: 0070293|
|2013-09-24 18:42||Jesus Reyes||Assigned To||=> Jesus Reyes|
|2013-09-24 18:42||Jesus Reyes||Status||new => assigned|
|2013-09-24 18:46||Jesus Reyes||Relationship added||related to 0022304|
|2013-09-24 18:48||Jesus Reyes||Fixed in Revision||=> 39124|
|2013-09-24 18:48||Jesus Reyes||LazTarget||- => 1.2|
|2013-09-24 18:48||Jesus Reyes||Status||assigned => resolved|
|2013-09-24 18:48||Jesus Reyes||Fixed in Version||=> 1.1 (SVN)|
|2013-09-24 18:48||Jesus Reyes||Resolution||open => fixed|
|2013-09-24 18:48||Jesus Reyes||Target Version||=> 1.2.0|
|2014-09-26 13:28||Mike Thompson||Status||resolved => closed|