Does SQL Server 2005 support datetime2

烈酒焚心 提交于 2019-12-11 09:03:33

问题


I can't seem to find in the official documentation if SQL Server 2005 supports datetime2 data type?


回答1:


Apparently it does not. Here are the supported data types.

EDIT:

According to the following sources datetime2 was introduced in SQL Server 2008.

http://blogs.msdn.com/b/manisblog/archive/2007/08/28/sql-server-2008-enhancements-in-date-and-time-data-types.aspx

http://www.4guysfromrolla.com/articles/101508-1.aspx




回答2:


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.

NOTE: You'll have to do this every time you update the model from database.




回答3:


maybe you encounter this problem:

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

you can see the solution as following:

Using SQL Server 2008 and SQL Server 2005 and date time



来源:https://stackoverflow.com/questions/9154606/does-sql-server-2005-support-datetime2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!