UniDac + Oracle 10g : select ... order by .. wrong order.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
wbjsoft
Posts: 24
Joined: Tue 08 Aug 2006 00:38

UniDac + Oracle 10g : select ... order by .. wrong order.

Post by wbjsoft » Thu 23 Jun 2011 05:53

Hello,

under MS-SQL - UniDac with same schema and same data
order by works well

COLUMN1 COLUMN2
-------------------------
TEST1
AAA TEST2
BBB TEST3
CCC TEST4

under Oracle - UniDac(direct mode) with same schema and same data

COLUMN1 COLUMN2
-------------------------
AAA TEST2
BBB TEST3
CCC TEST4
TEST1

Null COLUMN1 value goes last.

but Devart DBExpress Oracle Driver order is right.

only unidac oracle driver works wrong.

thank you.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 23 Jun 2011 09:57

Hello,

The sorting order is returned by the Oracle server and we don't change it. DbExpress has internal sorting of data sets that may differ from the Oracle one. To set standard sorting order, you should set the poRetainServerOrder option of the SQLQuery, ClientDataSet, and DataSetProvider components to True. The SimpleDataSet component does not have such option and always uses its internal order for sorting.

Please try to execute a query from SQL Plus and check the sorting order. If it differs from the UniDAC sorting order, please contact us once more.

Post Reply