Edmx datetime2


<< Implementing a Testable Mockable Repository pattern with the Entity Framework | Home | OO Refresher Course >>

This version of SQL Server in use does not support datatype datetime2 EF problem.

Tuesday, February 02, 2010 5:40 PM

Had a strange error come up today when I tried to use my home PC to run an Entity Framework project, the EDMX schema (is it a schema) was generated in SQL Server 2008 and my home dev machine has SQL Server 2005.

I wouldn't have thought this would be a problem as I don't use any 2008 specific features (except the intellisense ;P), but alas I was getting a lot of exceptions from my FunctionImports (stored proceedures in Entity Framework).

Upon investigating the stack trace it was telling me that the DateTime2 datatype was not supported in this version of SQL server, Very strange as I am sure that I do not use the Datetime2 or Date datatypes (these are 2008 specific)

This is due to the edmx file being generated or updated from a SQL 2008 instance and run against a SQL 2005 instance. I tried about every trick I could think of before reading about it here. Basically all you need to do is to open the EDMX file with XML Editor and change ProviderManifestToken=”2008” to ProviderManifestToken=”2005”. Thanks a bunch Alex Duggleby for the hint!

From The #Crypt Via Alex Duggleby

Just another thing that I hope will be fixed in the forthcoming EF4.

优质内容筛选与推荐>>
1、jquery 读取type=radio值
2、GCC编译选项
3、bash 看书摘抄(一):bash基础
4、-----------帮你解决在项目中使用swiper插件时图片不动的bug-----------
5、软件工程概论第十三周学习进度


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号





    联系我们

    欢迎来到TinyMind。

    关于TinyMind的内容或商务合作、网站建议,举报不良信息等均可联系我们。

    TinyMind客服邮箱:support@tinymind.net.cn