Saturday, 14 September 2013

SqlCe sorts automatically c#

SqlCe sorts automatically c#

I'm having a problem with Sql Ce in C#. I have a database with ids like
that for example *sS1 , ss2, ss3 ss4, ss5, ss6 ... ss10 ss1*1 etc... and
this is the order I have when I display the value with visual studio. But
if I execute this query for example
SELECT SubSectionID FROM Section_SubSection WHERE(SectionID=@SectionID)
I get the Ids sorted like this automatically. ss1, ss10, ss11, ss2, ss3
etc...
I can't understand why is this happening. Can someone tell me why ? I got
2 different versions of the same application I'm making and in the first
one it doesn't have that behavior and in the second one it does. I'm also
wondering does it have a relation with the fetch order: Backward or
Forward. I can't seem to find anything related to that online.

No comments:

Post a Comment