Edmx datetime2

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.

转载于:https://www.cnblogs.com/devilmsg/archive/2011/03/24/1993389.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值