[patch_done] DevExpress (quantumgrid) and ZeosLib

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

[patch_done] DevExpress (quantumgrid) and ZeosLib

Post 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.
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Post 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.
rickyxp
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 08.01.2010, 09:14

Post 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.
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Post 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.
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Post 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.
rickyxp
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 08.01.2010, 09:14

Post by rickyxp »

"TZQuery incorrectly processes the restoration of the position via bookmarks"?
Did they explain how?
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Post by yapt »

No. They didn't explain anything more and, after that, I have closed the incident. :?
rickyxp
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 08.01.2010, 09:14

Post 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.
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Post 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. :(
rickyxp
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 08.01.2010, 09:14

Post 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.
trupka
Expert Boarder
Expert Boarder
Posts: 140
Joined: 26.08.2007, 22:10

Post 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?
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Post by yapt »

Tested. I have gone to svn (zeos/branches/testing) version 770 and applied the patch.

But no luck. Same issue.

Sorry. :-(
trupka
Expert Boarder
Expert Boarder
Posts: 140
Joined: 26.08.2007, 22:10

Post 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.
You do not have the required permissions to view the files attached to this post.
yapt
Junior Boarder
Junior Boarder
Posts: 26
Joined: 17.06.2008, 20:32

Post 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.
trupka
Expert Boarder
Expert Boarder
Posts: 140
Joined: 26.08.2007, 22:10

Post 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
Last edited by trupka on 28.01.2010, 16:55, edited 2 times in total.
Locked