IE11 不能访问https 的一个解决方案-设置兼容模式

展开阅读全文

数据库兼容模式设置

11-09

我的sql语句是select * from Course where datediff(day,updatetime,getdate())>=30 and Type = @Type CourseTime like '%白天班%' ,在数据库可以查询出来,在vs中却报错。rn"day" 不是可识别的表提示选项。如果它要作为表值函数的参数,请确保您的数据库兼容模式设置为 90。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Data.SqlClient.SqlException: "day" 不是可识别的表提示选项。如果它要作为表值函数的参数,请确保您的数据库兼容模式设置为 90。rnrn源错误: rnrnrn行 227: catch (Exception ex)rn行 228: rn行 229: throw ex;rn行 230: rn行 231: finallyrn rnrn源文件: C:\Documents and Settings\Administrator\桌面\xiangmu\LSWeb\LSWebDAL\DBHelper.cs 行: 229 rnrn堆栈跟踪: rnrnrn[SqlException (0x80131904): "day" 不是可识别的表提示选项。如果它要作为表值函数的参数,请确保您的数据库兼容模式设置为 90。]rn LSWebDAL.DBHelper.GetDataTable(String sql, SqlParameter[] values) in C:\Documents and Settings\Administrator\桌面\xiangmu\LSWeb\LSWebDAL\DBHelper.cs:229rn LSWebDAL.CourseService.GetAllCourseByTime(Int32 Period, Int32 Start, Int32 Price, Int32 typeid, String Name) in C:\Documents and Settings\Administrator\桌面\xiangmu\LSWeb\LSWebDAL\CourseService.cs:1228rn LSWebBLL.CourseManager.GetAllCourseByTime(Int32 Period, Int32 Start, Int32 Price, Int32 typeid, String Name) in C:\Documents and Settings\Administrator\桌面\xiangmu\LSWeb\LSWebBLL\CourseManager.cs:215rnrn[TargetInvocationException: 调用的目标发生了异常。]rn System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0rn System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71rn System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +261rn System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29rn System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +488rn System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1247rn System.Web.UI.WebControls.BaseDataList.GetData() +38rn System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +153rn System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +54rn System.Web.UI.WebControls.BaseDataList.DataBind() +55rn System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +60rn System.Web.UI.WebControls.BaseDataList.CreateChildControls() +69rn System.Web.UI.Control.EnsureChildControls() +87rn System.Web.UI.Control.PreRenderRecursiveInternal() +44rn System.Web.UI.Control.PreRenderRecursiveInternal() +171rn System.Web.UI.Control.PreRenderRecursiveInternal() +171rn System.Web.UI.Control.PreRenderRecursiveInternal() +171rn System.Web.UI.Control.PreRenderRecursiveInternal() +171rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842rnrn rnrnrn 论坛

没有更多推荐了,返回首页