Special Characters with DataView.Sort

lcasselle

New member
Joined
Nov 10, 2005
Messages
1
Programming Experience
10+
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.
 
Back
Top