Sorting by calculated field does not work

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
alexkam75
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.01.2024, 06:54
Contact:

Sorting by calculated field does not work

Post by alexkam75 »

I create a calculated 'qty' field as TFloatField in TZQuery.
OnCalcFields
Queryqty.Value := 4;
When sorting
FieldName := FixFieldName('qty') + ' Asc'
TZAbstractRODataset(ADataSet).SortedFields:=FieldName;
Error appears
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Sorting by calculated field does not work

Post by marsupilami »

Hello,

which version of Zeos do you use? I seem to remember thios was a problem in Zeos 7.2. But I thought it was fixed for Zeos 8.

Which error message do you get?
Which version of Delphi or Lazarus / Freepascal do you use?
Can you provide a small sample application?

With best regards,

Jan
alexkam75
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.01.2024, 06:54
Contact:

Re: Sorting by calculated field does not work

Post by alexkam75 »

ERROR: ACCESS VIOLATION
lazarus-3.2-fpc-3.2.2-win64
zeos 8.0 last
http://svn.code.sf.net/p/zeoslib/code-0 ... .0-patches

Sample project:
https://disk.yandex.ru/d/o8XHP42Xq0-Z8Q
Last edited by alexkam75 on 10.04.2024, 15:05, edited 2 times in total.
alexkam75
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.01.2024, 06:54
Contact:

Re: Sorting by calculated field does not work

Post by alexkam75 »

Sorting by calculated field does not work. Example attached.
alexkam75
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.01.2024, 06:54
Contact:

Re: Sorting by calculated field does not work

Post by alexkam75 »

The error occurs in the file\src\dbc\ZDbcCache.pas
alexkam75
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.01.2024, 06:54
Contact:

Re: Sorting by calculated field does not work

Post by alexkam75 »

error1.png
You do not have the required permissions to view the files attached to this post.
alexkam75
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.01.2024, 06:54
Contact:

Re: Sorting by calculated field does not work

Post by alexkam75 »

Error executing CurrentRows.Sort(HighLevelSort)
procedure TZAbstractRODataset.InternalSort;
in src\component\ZAbstractRODataset.pas
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Sorting by calculated field does not work

Post by marsupilami »

Hello,

there seems to be an hard to fix issue with the way we handle calculated fields. We are currently investigating this. I willanswe when we have a solution ready.

With best regards,

Jan
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Sorting by calculated field does not work

Post by marsupilami »

Hello,

we think we solved your problem. Could you please check if the latest 8.0-patches branch works for you?

Best regards,

Jan
alexkam75
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.01.2024, 06:54
Contact:

Re: Sorting by calculated field does not work

Post by alexkam75 »

Thank you. Sorting works.
Post Reply