Home > Archive > SQL Anywhere ultralite > August 2005 > Ultralite .Net using a like and then sorting desc









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Ultralite .Net using a like and then sorting desc
Jonathan Chapman

2005-08-15, 11:23 am

Hi,
I'm using 9.0.2.3131.

Using iAnywhere.Data.UltraLite in C# when I do a query such as "Select
ID from SD_Product where ID like '1%' order by ID ASC" I get my expected
results. When I try the same query but sort Desc I get no results back in
my datareader. Can anyone tell me if this is a known issue that will be
fixed in a new release.

Thanks,
Jonathan


Jonathan Chapman

2005-08-15, 8:23 pm

It appears to only happen when using the ID field (Primary Key). If I do
the same queries with the description field there are no problems.

"Jonathan Chapman" < jonathan_chapman@ape
xsi.com> wrote in message
news:4300ba49$1@foru
ms-2-dub...
> Hi,
> I'm using 9.0.2.3131.
>
> Using iAnywhere.Data.UltraLite in C# when I do a query such as "Select
> ID from SD_Product where ID like '1%' order by ID ASC" I get my expected
> results. When I try the same query but sort Desc I get no results back in
> my datareader. Can anyone tell me if this is a known issue that will be
> fixed in a new release.
>
> Thanks,
> Jonathan
>
>



David Fishburn

2005-08-17, 1:23 pm

"Jonathan Chapman" < jonathan_chapman@ape
xsi.com> wrote in
news:4300ba49$1@foru
ms-2-dub of sybase.public.sqlanywhere.ultralite:

JC> I'm using 9.0.2.3131.
JC>
JC> Using iAnywhere.Data.UltraLite in C# when I do a query such as
JC> "Select
JC> ID from SD_Product where ID like '1%' order by ID ASC" I get my
JC> expected results. When I try the same query but sort Desc I get no
JC> results back in my datareader. Can anyone tell me if this is a known
JC> issue that will be fixed in a new release.

I believe you need an index on any column you intend to ORDER BY on.
Try creating an index.
In this case, since you are specifying ID like, you might try (two
separate tests) an index on ID, Description and one just with
Description.
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]

Michael Thode

2005-08-26, 11:23 am

Just to clairify one point, you don't need an index to do an orderby. In
many cases you will want one for better performance. If this issue this
still occurs with the latest ebf, then please submit a bug report.

Mike

"David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message
news:Xns96B5857C7391
2fishburnsybasecom@1
27.0.0.1...
> "Jonathan Chapman" < jonathan_chapman@ape
xsi.com> wrote in
> news:4300ba49$1@foru
ms-2-dub of sybase.public.sqlanywhere.ultralite:
>
> JC> I'm using 9.0.2.3131.
> JC>
> JC> Using iAnywhere.Data.UltraLite in C# when I do a query such as
> JC> "Select
> JC> ID from SD_Product where ID like '1%' order by ID ASC" I get my
> JC> expected results. When I try the same query but sort Desc I get no
> JC> results back in my datareader. Can anyone tell me if this is a known
> JC> issue that will be fixed in a new release.
>
> I believe you need an index on any column you intend to ORDER BY on.
> Try creating an index.
> In this case, since you are specifying ID like, you might try (two
> separate tests) an index on ID, Description and one just with
> Description.
> --
> David Fishburn
> Certified ASA Developer Version 8
> iAnywhere Solutions - Sybase
> Professional Services
> Please only post to the newsgroup
> Please ALWAYS include version and MORE importantly BUILD number with
> EACH post (dbeng9 -v).
>
> EBFs and Maintenance Releases
> http://downloads.sybase.com/swx/sdmain.stm
>
> Developer Community / Whitepapers
> http://www.ianywhere.com/developer
>
> CaseXpress - to report bugs
> http://casexpress.sybase.com
>
> CodeXchange - Free samples
> [url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com