MS SQL Server 2008 DateTime2 support

9 posts, 0 answers
  1. ie
    ie avatar
    7 posts
    Member since:
    Feb 2007

    Posted 03 Jun 2010 Link to this post

    Hey guys,

    Currently, the DateTime2 is mapped as a string. Such mapping results to DataStoreException. I found a similar thread. I'm using the build 2010.1.527.2. Is it Q1 2010?

    Thank,
    Ivan.
  2. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 04 Jun 2010 Link to this post

    Hello ie,

    at the moment, this type is not yet supported. We are currently working on improving type handling, but it won't be available until Q2.

    Best regards,
    Thomas
    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. Mika Jacobi
    Mika Jacobi avatar
    10 posts
    Member since:
    Aug 2009

    Posted 16 Jun 2010 Link to this post

    Hi !
    How is it possible to automatically force the mapping into "datetime" rather than "string" in the meanwhile (Q2) ?
    (by editing default mapping or a config file somewhere, rather that fetching manually each field with this type to change it)

    ThanX
  5. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 18 Jun 2010 Link to this post

    Hello Mika Jacobi,

    that should be possible by specifying
    ...
    <field name="myFieldName">
        <extension key="db-column">
            <extension key="db-type" value="DATE"/>
            <extension key="db-sql-type" value="DATETIME2"/>
        </extension>
    </field>
    ...

    We are currently working on making these types supported, and very likely you will not need to specify
    the db-type in the future.

    All the best,
    Thomas
    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
  6. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 18 Jun 2010 Link to this post

    Hello Mika Jacobi,

    I was a bit quick to hit the send button: These settings have to be made in the app.config file under the respective class element.

    Greetings,
    Thomas
    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. Pål
    Pål avatar
    53 posts
    Member since:
    Sep 2012

    Posted 16 Sep 2010 Link to this post

    Hi.

    I tried this manual mapping and the database creates a datetim2 field, but inserting anything before 1753 into SQL server throws an exception. Seems like there is a check before the insert to prevent this.

    Am I doing it wrong? Is support for this built in to the latest version?

    Thanks

    Pål
  8. Thomas
    Admin
    Thomas avatar
    590 posts

    Posted 16 Sep 2010 Link to this post

    Hello Pål,

    yes, seems like a bug. However, I've just verified this will work out of the box with the next release, which contains a better framework to deal with such altered types. Thanks for reporting this issue!

    Greetings,
    Thomas
    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
  9. Steve A
    Steve  A avatar
    5 posts
    Member since:
    Oct 2012

    Posted 17 Oct 2010 Link to this post

    Dear Telerik,

    This DateTime2 problem is very serious. Do you have a realistic timeline for the "Next Version"

    Thanks
  10. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 18 Oct 2010 Link to this post

    Hello Steve A,

    The Q3 2010 release is scheduled for the middle of November.

    Greetings,
    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
Back to Top
DevCraft banner