码迷,mamicode.com
首页 > 数据库 > 详细

使用的 SQL Server 版本不支持数据类型“datetime2”的解决办法

时间:2014-10-09 19:32:27      阅读:298      评论:0      收藏:0      [点我收藏+]

标签:io   使用   strong   文件   数据   on   ad   数据库   sql   

错误原因,在使用ado.net entity的时候,entity使用的数据库是sqlserver 2008,

但后来实际使用中使用的数据库是sqlserver 2005,

使用的 SQL Server 版本不支持数据类型“datetime2”

The version of SQL Server in use does not support datatype ‘datetime2 解决办法 Open your EDMX in a file editor (or “open with…” in Visual Studio and select XML Editor). At the top you will find the storage model and it has an attribute ProviderManifestToken. This has should have the value 2008. Change that to 2005, recompile and everything works.

就是打开你的edmx文件,搜索ProviderManifestToken值,改为2005就ok了。

使用的 SQL Server 版本不支持数据类型“datetime2”的解决办法

标签:io   使用   strong   文件   数据   on   ad   数据库   sql   

原文地址:http://www.cnblogs.com/superdong/p/4013794.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!