I have a simple table (with < 10 records) on which I do a select:
Code: Select all
SELECT ID, OMSCHRIJVING FROM LOCATIES ORDER BY OMSCHRIJVING
Without the "ORDER BY" clause but with the field "OMSCHRIJVING" in the property SortedFields of TZQuery gives the same exception. Also a seperate TZUpdateSQL object connected with the TZQuery with generated SQL gives the same exception.
A record other than the first one is no problem. If I retrieve the records from the table without the "ORDER BY" clause it is also no problem. Also when I make a index in the ClientDataSet.
I've searched the forum an read some issues with the same exception and should be solved.
http://zeoslib.sourceforge.net/viewtopi ... t=bookmark
http://zeoslib.sourceforge.net/viewtopi ... t=BOOKMARK
http://zeoslib.sourceforge.net/viewtopi ... t=BOOKMARK
http://zeoslib.sourceforge.net/viewtopi ... was#p18881
In the unit ZAbstractDataset.pas indeed the code is fixed, but not in ZAbstractRODataset.pas.
The exception comes from the unit ZAbstractRODataset.pas as if I used a read-only query (TZReadOnlyQuery) but that isn't the case. I know for sure I use a TZQuery.
I get the same exception on another tables with the "ORDER BY" clause.
Has anyone the same problem c.q. a solution other than no "ORDER BY" and a index in the ClientDataSet ?