dbCursor = dbSQL.ExecQuery("SELECT City, Country FROM Cities") ' ORDER BY City
With this:
B4X:
dbCursor = dbSQL.ExecQuery("Select City,Country FROM Cities ORDER BY (CASE SUBSTR(City,2,1) WHEN 'Ã' THEN REPLACE(City,'Ã','a') " _
& " WHEN 'ã' THEN REPLACE(City,'ã','a') ELSE City END) COLLATE NOCASE")
Also comment or remove this line:
ListCities.SortType("CityName",True) 'Needs commneted
Thanks @Mahares
Portuguese language has several accented characters (Ã, Á, À, Â, Ç, É, Ê, etc...) and will be a huge SQL only to sort the list correctly.
SQLite has a problem with sorted accented characters.
I hope that I can use the SortType in this case, with help of @Erel .
Here is your project zipped modified to accommodate any name with with any accents. It will do exactly what you want. Please add the JavaObject library. Every code I added has this comment next to it: '1/27/15 Mahares
Please run it and let us know. And if you still want Erel to respond to you, of course he will.
Here is your project zipped modified to accommodate any name with with any accents. It will do exactly what you want. Please add the JavaObject library. Every code I added has this comment next to it: '1/27/15 Mahares
Please run it and let us know. And if you still want Erel to respond to you, of course he will.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.