SqlDateTime overflow - SQL default values

4 posts, 0 answers
  1. FISCAL
    FISCAL avatar
    91 posts
    Member since:
    May 2010

    Posted 20 May 2010 Link to this post

    Hi,

    I have downloaded the latest build of ORM Open Access. Just wondering does Open Access supports SQL default value now in reverse mapping? For instance I am using getDate() and suser_name() functions in SQL Table.

    Please let me know.

    Thanks.

    Milan 
  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 21 May 2010 Link to this post

    Hi M G,

    I recommend you reading the following KB article "Setting default values" which demonstrates how to set default value of fields, but on the client side. Using defaults from server functions is not possible at the moment.
    I hope the article is helpful for you.

    Sincerely yours,
    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. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 31 Jul 2010 Link to this post

    Hi,

    I was somewhat surprised by this behavior... I got an error for some fields after creating an entity; a date field "CreatedOn", witch has a default value in sql server. I would expect Open Access to read the values, ore ignore them at the least, because the are automatically set by sql server...

    I've now used the tracker so all new entity objects are automatically set.

    In the article you linking at they speak of a forward mapping wizard, but I can't find it...

    Erik
  5. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 03 Aug 2010 Link to this post

    Hi Proovit,

    The old wizards including the Forward Mapping wizard are hidden now. This is because we are recommending the Domain Model to be used. In this scenario when you are using a domain model you could use the following approach to achieve this goal;
    1. Locate and click on the datetime property from the designer;
    2. Set the Kind option to PersistentReadOnly from the Properties Window grid;
    3. Save the rlinq file;
    You could find useful the attached sample application which demonstrates this behavior.
    I would also suggest you to have a look at this blog post which explains how to switch back to the old menus.
    Hope that helps.

    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
Back to Top