“/”應用程序中的服務器錯誤。

語法錯誤 (操作符丟失) 在查詢表達式 'id=2019楂樹紒璁ゅ畾' 中。

說明: 執行當前 Web 請求期間,出現未處理的異常。請檢查堆棧跟蹤信息,以了解有關該錯誤以及代碼中導致錯誤的出處的詳細信息。

異常詳細信息: System.Data.OleDb.OleDbException: 語法錯誤 (操作符丟失) 在查詢表達式 'id=2019楂樹紒璁ゅ畾' 中。

源錯誤:

行 886:            sql = "select * from content where id=" + Request.QueryString["id"];
行 887:            cmd.CommandText = sql;
行 888:            OleDbDataReader odrx = cmd.ExecuteReader();
行 889:            if (odrx.Read())
行 890:            {

源文件: d:\wwwroot\yncxcomcn\wwwroot\Default.aspx.cs    行: 888

堆棧跟蹤:

[OleDbException (0x80040e14): 語法錯誤 (操作符丟失) 在查詢表達式 'id=2019楂樹紒璁ゅ畾' 中。]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1007520
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +255
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +188
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +58
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +161
   System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +116
   System.Data.OleDb.OleDbCommand.ExecuteReader() +6
   _Default.modnewsdetail(String xx, String pindao) in d:\wwwroot\yncxcomcn\wwwroot\Default.aspx.cs:888
   ASP.newsdetail_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in d:\wwwroot\yncxcomcn\wwwroot\newsdetail.aspx:7
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


版本信息: Microsoft .NET Framework 版本:2.0.50727.8806; ASP.NET 版本:2.0.50727.8762