SQL ServerE牧马人ROTucson: The version of SQL Server in use does not support datatype ‘datetime贰’.

在刚接触的MVC二萨姆ple(NerdDinner)中,作者把SQL贰零壹零的数据库转为SQL2005后

出现了

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

 

其难题产生的来由是SQL200五平素不该数据类型 datetime二

接下来GOOGLE一翻找到答案

 

产生那些标题标严重性缘由是*.edmx中得以设置1个数额库版

 

<Schema Namespace=”NerdDinnerModel.Store” Alias=”Self”
Provider=”System.Data.SqlClient” ProviderManifestToken=”2008″
xmlns:store=”http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator%22
xmlns=”http://schemas.microsoft.com/ado/2009/02/edm/ssdl%22>

 

改为

 

<Schema Namespace=”NerdDinnerModel.Store” Alias=”Self”
Provider=”System.Data.SqlClient” ProviderManifestToken=”2005″
xmlns:store=”http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator%22
xmlns=”http://schemas.microsoft.com/ado/2009/02/edm/ssdl%22>

即可

相关文章