This is a migrated thread and some comments may be shown as answers.

SqlDateTime overflow - SQL default values

3 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
FISCAL
Top achievements
Rank 1
FISCAL asked on 20 May 2010, 10:00 AM
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 

3 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 21 May 2010, 09:03 AM
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.
0
Erik
Top achievements
Rank 2
answered on 31 Jul 2010, 04:07 PM
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
0
Damyan Bogoev
Telerik team
answered on 03 Aug 2010, 06:43 PM
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
Tags
General Discussions
Asked by
FISCAL
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Erik
Top achievements
Rank 2
Share this question
or