Page 1 of 1

How to change type of sorting

Posted: Wed 10 Nov 2010 12:53
by romanFleischer
Hello,

we use dotConnect 5.70.120.00 with MS entity framework. Nearmost everything works well, but the sorting seems to be ASCII instead of national letters. So big letter words were shown prior to smal letter words.

This is wrong for our customer. We try to use NLS_SORT and ALTER SESSION. This works well when we connect direct to the database. But where can we set this value inside our sw-solution? How is it possible to change sorting?

Thanks
Roman

Posted: Fri 12 Nov 2010 12:39
by AndreyR
Create a partial class (or use the exitsting DataModel.cs if you are using a .edml model), and add the OnContextCreated method.
In this method you should open the store connection:

Code: Select all

((EntityConnection)(db.Connection)).StoreConnection.Open();
Execute the code that will influence the sorting after opening the connecton. Don't close it, the session is flushed when the connection is closed.