Allow SQL Server to autogenerate values

3 posts, 1 answers
  1. Cristian Apavaloaiei
    Cristian Apavaloaiei avatar
    25 posts
    Member since:
    Aug 2008

    Posted 28 Oct 2010 Link to this post

    Hello,

    Is it possible to have fields that are autogenerated when adding items to the database?
    For example,a GUID primary key, a field that is an autoincrementing int but is not a primary key, or a field that specifies the current date and time.

    Thank you
  2. Answer
    Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 02 Nov 2010 Link to this post

    Hi Cristian Apavaloaiei,

    You can define properties mapped to such columns as read-only. This way they will not be included in the insert / update SQL statements and will be left to the sql server to generate them. To enable this option, select a property from the dsl diagram, go to the Properties pane (or press F4) and set the Kind property to PersistentReadOnly. Hope that helps.

    All the best,
    Alexander
    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. Cristian Apavaloaiei
    Cristian Apavaloaiei avatar
    25 posts
    Member since:
    Aug 2008

    Posted 03 Nov 2010 Link to this post

    Thank you
Back to Top