VirtualTable sorts wrong (?)

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
B4rT
Posts: 6
Joined: Mon 17 Jan 2005 11:41
Contact:

VirtualTable sorts wrong (?)

Post by B4rT » 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
Last edited by B4rT on Thu 24 Mar 2005 11:48, edited 1 time in total.

B4rT
Posts: 6
Joined: Mon 17 Jan 2005 11:41
Contact:

VirtualTable sorts wrong (?)

Post by B4rT » Thu 24 Mar 2005 11:46

Other sample - try to sort that:
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30

This data is not sorted at all !! (data type of column (total) is ftSmallInt)


I'VE NOTICED, THAT IF THE COLUMN TYPE IS ftString OR ftInteger THEN EVERYTHING IS OK - THAT MEANS SORTING IS WORKING PROPERLY.
SORTING IS NOT WORKING WHEN THE TYPE IS ftWord OR ftSmallint

B4rT

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Thu 24 Mar 2005 13:14

Thank you for information.
We reproduced your problem and fixed it. This fix will be included in the
next SDAC build.

Post Reply