[bug_fixed] Bug in ZAbstractRODataset (6.6.0 beta version)

In this forum all bug reports concerning the 6.x branch will be gahtered. You have the possibility to track the bug fix process.

Moderators: EgonHugeist, mdaems

pawelsel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 13.11.2006, 09:39
Location: Olsztyn

[bug_fixed] Bug in ZAbstractRODataset (6.6.0 beta version)

Postby pawelsel » 13.11.2006, 10:30

In previous version (6.1.5) it works perfectly.
In version 6.6.0 beta I can't set SortedFields like this:

SortedFields:='OP_DATE DESC,OP_NUMBER';

When I check in debugger content of this property after this
line I see this:

'OP_DATE'

I checked code of ZAbstractRODataset and this is what I saw in
procedure SetOrderFields

{removing ASC or DESC behind space}
if Pos(' ',Value)>0 then
Value:=Copy(Value,1,Pos(' ',Value)-1); {bangfauzan addition}

This code REMOVES ALL TEXT AFTER SPACE!!!,
regardless with or without ASC or DESC in text.
Including FIELDS!!! (i.e. 'OP_DATE, OP_NUMBER')

After that procedure sets the sort type on base FIndexFieldNames (???),
than sets FindexFieldsNames with that sort type on the end.
Interesting idea.

For example:

SortType:=stDescending;
SotedFields:='OP_DATE';

Result-> FIndexFieldNames='OP_DATE Desc'

but after

SortedFields:='OP_DATE,OP_NUMBER';

Result-> FIndexFieldNames='OP_DATE,OP_NUMBER Desc'
BAD SORT ORDER!!! LAST FIELD IS SORTED DESCENDING!!!
(Why? Because SortType is set to stDescending)

and after

SortedFields:='OP_DATE DESC,OP_NUMBER';

Result-> FIndexFieldNames='OP_DATE Desc'
BAD SORT ORDER!!! ONLY FIRST FIELD IS ON LIST!!!
(Why? Because there is a Space after this field)

In my opinion in this version there is no method to
set the proper order with many fields in this dataset.
I must use the previous version of this file.

User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Postby mdaems » 13.11.2006, 12:59

Hi,
Can you try LinkedFields property? This should be the old IndexFieldsnames Property. This change was done to have more compatibility with other components. Maybe you can have a discussion with bangfauzan. (He's also from poland, so pm's are very easy)

Mark

pawelsel
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 13.11.2006, 09:39
Location: Olsztyn

Postby pawelsel » 13.11.2006, 14:01

Hi Mark

Property LinkedFields is in protected section and there is no
way to use it without publishing.

How can I contact with bangfauzan directly?

User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Postby mdaems » 13.11.2006, 15:33

You can use private messages. If you look at his profile there should be a pm button. There you can ask him whatever you want. Email, phone, Irc, ...
I'll send you a pm, just in case you never used it before. (See links on top of the forum)
Mark

plamendp
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 02.09.2005, 16:57

Postby plamendp » 26.11.2006, 18:10

I am little bit lost here.

I did not test all of this "sorted fields" issues but looking at the source I am under impression that the only construction possible is like this:


.... ORDER BY Field1,Field2,Field3,Field4 ASC


but what about this one:


.... ORDER BY Field1 ASC, Field2 DESC, Field3 ASC, Field4 DESC

i.e. sorting direction different for every field?

I for myself construct SQL queries manualy and never hit this case but.. now I'll check it.


Plamen

plamendp
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 02.09.2005, 16:57

Postby plamendp » 26.11.2006, 18:13

Oops.. sorry... SortedFieldDirs

User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Postby mdaems » 12.12.2006, 00:14

Hi,

In the meantime this behaviour has changed. See testing and trunk snapshots available here.

I'll close this bug report. If there's still an error and it's not in an other bugreport we can reopen this one. Fauzan is still reviewing his code for some other bugs, however.

Mark


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest