2011Q1 "forgets" to map property datatype from table

6 posts, 1 answers
  1. Skywalker
    Skywalker avatar
    67 posts
    Member since:
    Sep 2007

    Posted 19 Mar 2011 Link to this post

    *Please see below*
  2. Skywalker
    Skywalker avatar
    67 posts
    Member since:
    Sep 2007

    Posted 19 Mar 2011 Link to this post

    When I create a class from a table, the class properties use "Object" as a datatype, instead of mapping the datatypes from the table columns to .NET types on the created class. See attached screenshot for what I mean. You may also download a sample project demonstrating the issue here.
  3. DevCraft banner
  4. Skywalker
    Skywalker avatar
    67 posts
    Member since:
    Sep 2007

    Posted 19 Mar 2011 Link to this post

    I think I know what's going on: somehow 2011.Q1 doesn't support all of the MS SQL Server datatypes anymore.
    In my "old" .rlinq" file for example, I used the "time" SQL Server datatype. But that type isn't shown anymore in the "Edit table..." dialog window, so I guess that's the reason OA mapped property types to "Object" because it doesn't know to map "time" to System.DateTime anymore.

    Question: why doesn't OA support all of the SQL Server datatypes anymore, like "date", "time", "smallmoney" etc.?

    Thanks,
    Sipke
  5. Skywalker
    Skywalker avatar
    67 posts
    Member since:
    Sep 2007

    Posted 20 Mar 2011 Link to this post

    I found out what was going on thanks to OA and the error list window: somehow the backend settings were not synchronized. When I doubleclicked that warning, OA allowed me to select the correct database server. After selecting MSSQL 2008, I am now able to use all of the SQL Server types. All is well :)
  6. Answer
    Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 24 Mar 2011 Link to this post

    Hi Skywalker,

     I apologize for the late response in this thread. I am happy that it all ended well in the end for you and you managed to resolve the problem yourself. However, if you manage to reproduce the scenario in which your model has no Backend set, please share the steps towards achieving that scenario. The idea is that we do not want to allow such workflow that would let the user have his model in such inconsistent state.  

    All the best,
    Zoran
    the Telerik team
  7. Skywalker
    Skywalker avatar
    67 posts
    Member since:
    Sep 2007

    Posted 18 Apr 2011 Link to this post

    Hi Zoran,

    Sure thing, I will let you know what steps to take to reproduce the problem. Up until now I wasn't able to find out why it happens, but once I do I will update this thread. It may have something to do with selecting MSSQL2008 instead of MSSQL, but I'm not sure.

    Thanks,
    Skywalker
Back to Top
DevCraft banner