473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sorting dataview containing NonAlphanumeric apostrophe characters

2
When using a SqlDataReader to retrieve data from a SQL Server the data is ordered according to the Order By clause in the query. So that if I get a list of names and Order By lastname ascending here is an example of the order:
O Leary, Shannon
O'Baine, Michael
O'Neil, Veronica
Oboyle, Michael
Where the nonalphanumeric apostrophe character comes before alphanumeric characters. However if I pull the data from SQL Server into a DataView and then set the Sort Property to "LastName asc" then the order is:
O Leary, Michael
O'Baine, Michael
Oboyle, Michael
O'Neal, Veronica
In the DataView sort the nonalphanumeric apostrophe character seems to be ignored. Does anyone know how I can get the DataView to sort the names so that the apostrophe is placed before alphanumeric characters.
Feb 20 '13 #1
2 1703
Mikkeee
94 64KB
You're going to need to handle the sorting yourself. Take a look at http://msdn.microsoft.com/en-us/library/ms171608.aspx
Feb 23 '13 #2
PVDM
2
Thanks Mikkeee for the link.
Feb 25 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

39
by: Erlend Fuglum | last post by:
Hi everyone, I'm having some trouble sorting lists. I suspect this might have something to do with locale settings and/or character encoding/unicode. Consider the following example, text...
0
by: lungwahchong | last post by:
Hi, I have these strings which are pulled from a database which contains both english and chinese characters(big5). e.g. Fragrant Rice 10kg Green Dragon???? Broken Rice 10kg G.Elephant...
1
by: news | last post by:
Hi there, I have a table in an Oracle 9i R2 database containing the following string" "It's so easy" When I try to execute the following query: SELECT EXPRESSION FROM EXPRESSIONS WHERE...
9
by: James Aguilar | last post by:
Hey all, I am trying to write a preliminary compression routine which counts the number of different characters it sees in an input stream, compresses that set of characters to either 2 bits, 4...
4
by: ALiX | last post by:
I am using a std::list<MyClass> where objects of type MyClass can be big in size. Can using std::list<>::sort result in objects inside the list being copied around or does the list merely reassign...
1
by: sid | last post by:
Hello, I have got a requirement in my project where there is a NAME column in a table which will contain double byte Japanese characters .I have SORT results by this NAME column which contains...
8
by: DierkErdmann | last post by:
Hi ! I know that this topic has been discussed in the past, but I could not find a working solution for my problem: sorting (lists of) strings containing special characters like "ä", "ü",......
1
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, I set a dataview to a table. Then I bind a currencyManager to the dataview. I can iterate through the dataview no problem so far. Then I sort the dataview on a certain field and rebind...
4
by: Holger | last post by:
I tried to do this elegantly, but did not come up with a good solution Sort strings like foo1bar2 foo10bar10 foo2bar3 foo10bar2 So that they come out: foo1bar2
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.