Page 1 of 2
[patch_done] DevExpress (quantumgrid) and ZeosLib
Posted: 30.12.2009, 12:15
by yapt
Hello,
I am trying to work with zeoslib (svn) and Devexpress (Delphi 2010). I have this:
1.- TZquery (or TZReadOnlyQuery).
2.- Standard Datasetassociated with the TZQuery
3.- QuantumGrid (devexpress) associated with the Dataset.
When I active the Query, EOF is true.
When I go to ZQuery1.first, EOF is true.
If I "disconnect" QuantumGrid from TZQuery, then EOF is false on both situations.
If I sustitute:
TZQuery with TADODataSet
TZQuery with PgQuery (Devart)
TZQuery with ...............
And reconnect it with QuantumGrid, all is ok. EOF is false.
It seems a problem with ZeosLib ONLY.
Greetings.
Posted: 07.01.2010, 16:36
by yapt
ZeosLib runs fine with others Database components.
It seems that DevExpress QuantumGrid + ZeosLib is causing this .eof error.
I am with DevExpress support to get it to run. I will inform here.
Posted: 08.01.2010, 09:26
by rickyxp
What we've also found is:
When a TZQuery is attached to a DevExpress control (not only grid, but lookupcombo etc.),
any action which causes the record pointer to move does not work.
e.g. TZQuery.locate, .first, .last, .next, .prior etc.
The DevExpress control ALWAYS move the record pointer to the eof position of the recordset.
Our present temporary workaround is to issue a TZQuery.disablecontrols before doing these actions and then issue a TZQuery.enablecontrols afterwards.
Looking forward to see the ultimate solution.
Posted: 08.01.2010, 18:52
by yapt
DevExpress is working on the issue. My colleague has sent an application example to DevExpress support.
I think if they can solve the "generic" eof problem, all of the rest will be solved too.
But I have not much belief on it.
Best Regards.
Posted: 11.01.2010, 16:38
by yapt
Here is the answer from DevExpress support services. They tell us it is an issue with ZeosLib and the DevExpress "way of do".
In spite of the advice, it doesn't run at all. The only solution is disable controls.
First, let me explain how cxGrid works in default loading mode.
When you open some DataSet, the cxGrid saves the current position (via bookmarks), loads all data to the DataController object and restores its position in the DataSet:
[Delphi]
Code: Select all
procedure LoadData;
...
SavePos;
First;
...
while not IsEOF do
begin
ARecordIndex := DataStorage.AppendRecord;
DataStorage.ReadRecord(ARecordIndex, AValueDefReader);
Self.DoReadRecord(ARecordIndex);
Next;
end;
...
RestorePos;
...
However, the TZQuery incorrectly processes the restoration of the position via bookmarks.
That is why you see this behavior (Eof = true).
To solve this problem, you can manually call the ZQuery1.First method or use our cxGrid in GridMode.
Please refer to the "Grid Mode" topic of the ExpressQuantumGrid documentation to learn more about it.
Hope, it will help you achieve the required functionality.
Posted: 13.01.2010, 12:04
by rickyxp
"TZQuery incorrectly processes the restoration of the position via bookmarks"?
Did they explain how?
Posted: 13.01.2010, 16:39
by yapt
No. They didn't explain anything more and, after that, I have closed the incident.
Posted: 13.01.2010, 16:57
by rickyxp
We've found that when a TZQuery is linked to a quantumgrid,
and when one of the columns is sorted, the eof problem seems not appearing. We'll do more tests on that. And it seems not consistent with what they said.
I think that Quantum being sold as a commercial software should provide more support. How can they just throw a few words and go away like that? Maybe they're right but at least they should provide some evidence.
Posted: 13.01.2010, 22:19
by yapt
Rickyxp,
I only can insist and re-open the issue if I can object something to the DevExpress support answer. If nobody of the ZeosLib developers can help here then I cannot do any more.
* DevExpress runs fine with any other dataset components I have tested (PostgresDAC, Devart Oracle and Postgres native, native Delphi datasets....) except with ZeosLib.
* ZeosLib runs fine with standard DbGrid (i have not checked any more grid) but not with DevExpress.
I cannot do anything more.
Posted: 18.01.2010, 14:15
by rickyxp
Dear yapt,
Would you mind asking the DevExpress support whether they can point out where "TZQuery incorrectly processes the restoration of the position via bookmarks" (and when one column of quantum grid is sorted, that doesn't apply.)
or that's just a guess.
Posted: 23.01.2010, 15:34
by trupka
yapt,
I just encounter problem with standard grid - please see:
http://zeosbugs.firmos.at/view.php?id=216
I don't have devex components so I can only assume that we have common problem but can you test this?
Posted: 24.01.2010, 00:35
by yapt
Tested. I have gone to svn (zeos/branches/testing) version 770 and applied the patch.
But no luck. Same issue.
Sorry. :-(
Posted: 25.01.2010, 17:06
by trupka
yapt,
I investigated this further and (maybe?) solved problem completely. Attached pactch against rev776 solves all my problems and maybe yours also. Please try it.
Modifications from last patch are included in file.
P.S.
Also corrected possible problem with unassigned ApplicationHandleException pointer.
Posted: 25.01.2010, 17:30
by yapt
Hello trupka,
I have patched it and I have had errors on compilation. I have had to change every:
PInteger(Bookmark1^)
with
PInteger(Bookmark1)
After that, the problem persists. Eof when the dataset is opened.
Thanks for your help.
Posted: 25.01.2010, 20:22
by trupka
Rev.779 doesn't completely solve problem (Lazarus64 wont work). I posted (maybe) final solution here:
http://zeosbugs.firmos.at/file_download ... 0&type=bug. More info:
http://zeosbugs.firmos.at/view.php?id=216