【发布时间】:2011-12-31 01:41:24
【问题描述】:
我刚刚将一个新版本的代码上传到我的服务器,并得到了这个我无法理解且不知道如何解决的错误错误 - 我对 datetime2 没有任何更改 - 我什至没有这个词代码语法。 你知道那是什么意思吗?
执行命令定义时出错。有关详细信息,请参阅内部异常:
InnerException: System.ArgumentException: 正在使用的 SQL Server 版本不支持数据类型“datetime2”。
在 System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String 方法)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior 行为,字符串方法)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior 行为)
在 System.Data.Common.DbCommand.ExecuteReader(CommandBehavior 行为)
在 System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior 行为
【问题讨论】:
-
对ef一无所知,您是否有可能在不指定数据类型的情况下调用带有值的添加参数?近似方法名称
标签: sql entity-framework entity-framework-4 entity-framework-4.1