Unicode Support (i.e. nvarchar)

7 posts, 2 answers
  1. Brian
    Brian avatar
    40 posts
    Member since:
    Oct 2008

    Posted 20 Sep 2010 Link to this post

    With the new 2010 Q2 version of ORM, it looks like there is no easy way in the designer to indicate a unicode field in the database.  .NET's string class already supports unicode, so that is fine.  However, in the dropdown in the edit table dialog, it only shows varchar, not nvarchar.  Do you intend to fix this soon?

    I assume you can hack the .rlinq file (as you have to do in several other cases now to work around designer bugs) by editing the sql-type property in the orm:field element.  Is there anything else to do, and will that work?

    Thanks!

  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 21 Sep 2010 Link to this post

    Hello Brian Womack, PhD,

    First of all I want to apologize for the inconvenience caused.
    1.   In fact this is a known issue which is fixed and the fix will be available in the next release of the product. The SqlType combo box will be populated with the database specific types.
    2.   Yes, you should use this approach in order to set a column as nvarchar.

    All the best,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Brian
    Brian avatar
    40 posts
    Member since:
    Oct 2008

    Posted 21 Sep 2010 Link to this post

    Thanks!

    I figured it was a coding oversight with all the huge amount of new code you guys got in place quickly.
  5. Brian
    Brian avatar
    40 posts
    Member since:
    Oct 2008

    Posted 23 Sep 2010 Link to this post

    By the way, I did try the .rlinq hack (i.e. editing sql-type in the orm xml element from varchar to nvarchar) and it did not work (the database still had varchar when I generated the new creation script in the designer.

    So, it looks like unicode support is broken entirely in this version of the ORM.  This is very important to me, since I need to support unicode (a lot of our data has it).  Please make sure it is in the Q3 release.
  6. Answer
    Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 27 Sep 2010 Link to this post

    Hi Brian Womack,

    1. I modified successfully the sql type of a column and the new type was included in the ddl script.
    Here are the steps:
    - Open the rlinq file in edit mode;
    - Locate the column under the following path rlinq|Runtime|orm:orm|orm:schema|orm:table(table which contains the column)|orm:column;
    - Modify the sql-type attribute to nvarchar;
    - Save the rlinq file and close it;
    - Rebuild the project;
    - Run the Update schema from model wizard;
    2. We have already implemented this and it will be part of the next Q3 release.

    All the best,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Brian
    Brian avatar
    40 posts
    Member since:
    Oct 2008

    Posted 28 Sep 2010 Link to this post

    Thanks!  I see what my problem was.  I was only modifying sql-type in
    • rlinq|runtime|orm:orm|orm:namespace|orm:class|orm:field
    • whereas you edited
    • rlinq|runtime|orm:orm|orm:schema|orm:table|orm:column.

    When I edited both places to change ado-type="Varchar" sql-type="varchar" to ado-type="NVarchar" sql-type="nvarchar", then the change showed up in the database change script.

    It does leave me wondering if I need to change all four places, or if I can just change rlinq|runtime|orm:orm|orm:schema|orm:table|orm:column|sql-type and call it good.  It made me uneasy to leave the others varchar.  Your thoughts?
  8. Answer
    Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 28 Sep 2010 Link to this post

    Hi Brian Womack,

    It is enough to change only the orm:column|sql-type without modifying orm:column |ado-type, orm:field | sql-type or orm:field | ado-type. Hope that helps.

    Kind regards,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner