“/”应用程序中的服务器错误。

语法错误。 在查询表达式 'Id not in ( select top -15 Id from  News where MenuId=? order by Id desc) and MenuId=?' 中。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Data.OleDb.OleDbException: 语法错误。 在查询表达式 'Id not in ( select top -15 Id from  News where MenuId=? order by Id desc) and MenuId=?' 中。

源错误:


行 2832:          return items;
行 2833:            }
行 2834:       catch (Exception)           { throw;}
行 2835:       finally
行 2836:         {

源文件: d:\wwwroot\www.narniatex.com\App_Code\GeneralCode\NewsOperator.cs    行: 2834

堆栈跟踪:


[OleDbException (0x80040e14): 语法错误。 在查询表达式 'Id not in ( select top -15 Id from  News where MenuId=? order by Id desc) and MenuId=?' 中。]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1212757
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +256
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +216
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +60
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +164
   System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +115
   System.Data.OleDb.OleDbCommand.ExecuteReader() +12
   NewsOperator.SelectNewsByPageMenuId(Int32 count, Int32 page, Int32 className) in d:\wwwroot\www.narniatex.com\App_Code\GeneralCode\NewsOperator.cs:2834
   Evaluation.FillRepeater(Int32 page) in d:\wwwroot\www.narniatex.com\Evaluation.aspx.cs:35
   Evaluation.Page_Load(Object sender, EventArgs e) in d:\wwwroot\www.narniatex.com\Evaluation.aspx.cs:20
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.3928.0