this is my first zeos hack
it is simple but this is the only way i can do this (hacking zeoslib)
After Post zeos allways do sorting (if SortedFields is filled).
With TDBGrid this is not ideal behavior - bad performance, and sequence of records is changed if sorted field changing...
After this little patch there is another option doDontSortOnPost
in ZAbstractRODataset.pas
Code: Select all
{** Options for dataset. }
TZDatasetOption = (doOemTranslate, doCalcDefaults, doAlwaysDetailResync,
doSmartOpen, doDontSortOnPost);
Code: Select all
procedure TZAbstractDataset.InternalPost;
(...)
{BUG-FIX: bangfauzan addition}
if (SortedFields<>'') and not (doDontSortOnPost in Options) then begin
FreeFieldBuffers;
SetState(dsBrowse);
Resync([]);
(...)
Karpik
PS Sorry for bad english