I can't find in the official documentation if SQL Server 2005 supports the datetime2
data type.
Asked
Active
Viewed 7,516 times
2
3 Answers
6
Apparently it does not. Here are the supported data types.
EDIT:
According to the following sources datetime2 was introduced in SQL Server 2008.
https://web.archive.org/web/20211020150018/https://www.4guysfromrolla.com/articles/101508-1.aspx

Garett
- 16,632
- 5
- 55
- 63
-
It says "SQL Server 2008" in the header of your link? – ahmd0 Feb 06 '12 at 01:13
-
@ahmd0 I updated the link. It does not support datetime2 based on data types listed. – Garett Feb 06 '12 at 01:14
-
Yeah, I thought so. Thank you. – ahmd0 Feb 06 '12 at 01:15
1
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.

Maher Ben Issa
- 651
- 7
- 12
0
maybe you encounter this problem:
The version of SQL Server in use does not support datatype 'datetime2
you can see the solution as following: