您的位置:首页 > 数据库

The version of SQL Server in use does not support datatype 'datetime2'.

2014-12-09 21:16 911 查看
使用的 SQL Server 版本不支持数据类型“datetime2”解决办法

错误原因,在使用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~~~~~~~~~
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  EF
相关文章推荐