使用的 SQL Server 版本不支持數據類型“datetime2”解決辦法

本文zhan章來源于 http://blog.csdn.net/soulzx/article/details/6756723

錯誤原因,在使用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~~~~~~~~~

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容