Order by cast

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
Beluco
Posts: 15
Joined: Mon 20 Oct 2008 02:19

Order by cast

Post by Beluco » Wed 21 Apr 2010 22:12

Using the IBExpert:
select N.NUMERO from TESTE N order by cast(N.NUMERO as begint);
or ... order by lpad(N.NUMERO, 20, '0')
works perfectly.
But with D2009 + DbxIda 2.50.22 = does not work.
Please some advice / suggestions?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 22 Apr 2010 07:23

I could not reproduce the problem.
Please send me a complete small sample to dmitryg*devart*com to demonstrate it, including a script to create and fill table.

Beluco
Posts: 15
Joined: Mon 20 Oct 2008 02:19

Post by Beluco » Thu 22 Apr 2010 17:53

Now I became ill.
Under Development app and a small table with data to send them, found that it works properly.
Then, more motivated, reviewed in detail the lines of code in the app and also use the table, and finds nothing wrong. However, no ordering appropriately (ordered alphabetically, but not ordering as bigint).
Any suggestions?
Thank you.

Beluco
Posts: 15
Joined: Mon 20 Oct 2008 02:19

Post by Beluco » Thu 22 Apr 2010 20:04

Ok, I found the problem:
set was missing in poRetainServerOrder = True no DataSetProvider.
is solved.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 23 Apr 2010 06:25

It is good to see that this problem has been solved.

Post Reply