VirtualTable sorts wrong (?)
Posted: Thu 24 Mar 2005 11:04
I don't know if I can describe this. I think, I must send you data set.
How can I send you file with VirtualTable data (*.vtd) ?
The data set should always be sorted: first by column 'total' (data type of this column is ftSmallInt), and then possibly by other columns.
In column 'total' there are only '0' (zeroes), four '2' (twos) and one '1' (one).
When I set IndexFieldNames := 'total; ' the column 'total' (data set) is NOT sorted properly!
Effect of sorting (by) column 'total' is: 0, 0, 0, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, .....
Where is the problem?
I'm using SDAC 3.50.0.12 for Delphi 6
P.S.
Moreover, when i sort by column 'total' AND any other column, then this wrong sorted rows (first or last 3) aren't sorted properly too (only 2 of 3 rows are sorted - the third row isn't participate in sorting).
In other words, try to sort my dataset by column:
1) total
2) total AND any other column (watch the first/last 3 rows)
OR SIMPLY TRY THAT:
make a dataset with one column (let's say 'total') which have values:
0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0
and sort it by setting IndexFieldNames.
My result is:
2, 2, 1, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
B4rT
How can I send you file with VirtualTable data (*.vtd) ?
The data set should always be sorted: first by column 'total' (data type of this column is ftSmallInt), and then possibly by other columns.
In column 'total' there are only '0' (zeroes), four '2' (twos) and one '1' (one).
When I set IndexFieldNames := 'total; ' the column 'total' (data set) is NOT sorted properly!
Effect of sorting (by) column 'total' is: 0, 0, 0, 2, 2, 2, 2, 1, 0, 0, 0, 0, 0, .....
Where is the problem?
I'm using SDAC 3.50.0.12 for Delphi 6
P.S.
Moreover, when i sort by column 'total' AND any other column, then this wrong sorted rows (first or last 3) aren't sorted properly too (only 2 of 3 rows are sorted - the third row isn't participate in sorting).
In other words, try to sort my dataset by column:
1) total
2) total AND any other column (watch the first/last 3 rows)
OR SIMPLY TRY THAT:
make a dataset with one column (let's say 'total') which have values:
0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0
and sort it by setting IndexFieldNames.
My result is:
2, 2, 1, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
B4rT