OleDB : ORDER BY 's order.

S

Sin Jeong-hun

com.CommandText="SELECT title FROM books ORDER BY title";
com.ExecuteReader();
......

The titles contain Alphabets, Hangeul(the Korean alphabets) and
numbers. The ORDER BY sorts titles in number-Hangeul-Alphabets order.
(Maybe this is because the system locale is Korean. I have ascertained
that when the Regional Options' Standard and formats are set to Korean,
the items in Windows Explorer are sorted in number-Hangeul-Alphabets
order and when English, number-Alphabets-Hangeul order)

Anyways, I want the ORDER BY always sort the title in
number-Alphabets-Hangeul order no matter what the system locale is. Is
there any way to do this?

If you are sure that there is no way to control the ORDER BY, just
please tell me that. Then I could stop wasting my time on this.

Thank you.
 
J

John B

Sin said:
com.CommandText="SELECT title FROM books ORDER BY title";
com.ExecuteReader();
.....

The titles contain Alphabets, Hangeul(the Korean alphabets) and
numbers. The ORDER BY sorts titles in number-Hangeul-Alphabets order.
(Maybe this is because the system locale is Korean. I have ascertained
that when the Regional Options' Standard and formats are set to Korean,
the items in Windows Explorer are sorted in number-Hangeul-Alphabets
order and when English, number-Alphabets-Hangeul order)

Anyways, I want the ORDER BY always sort the title in
number-Alphabets-Hangeul order no matter what the system locale is. Is
there any way to do this?

If you are sure that there is no way to control the ORDER BY, just
please tell me that. Then I could stop wasting my time on this.

Thank you.
As G.Y. said, it would be better in the relevant db group but...
You need to look at collations in the order by clause ie order by title
collate <number-Alphabets-Hangeul collation name>

in MS Sql Server it works as:
select * from fubar order by blah collate Albanian_BIN2

JB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top