'/' 應用程式中發生伺服器錯誤。

查詢運算式 'main_id=  and  isopen='私密'' 中的 語法錯誤 (少了運算元)。

描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外詳細資訊: System.Data.OleDb.OleDbException: 查詢運算式 'main_id=  and  isopen='私密'' 中的 語法錯誤 (少了運算元)。

原始程式錯誤:


行 19:         ads.SelectCommand = "SELECT count(*)  FROM forummain where main_id=" & Request.QueryString("main_id") & "  and  isopen='" & "私密" & "'"
行 20: 
行 21:         dv = ads.Select(New DataSourceSelectArguments)
行 22:         cnt = dv.Item(0)(0).ToString
行 23:         If cnt > 0 Then

原始程式檔: D:\inetpub\wwwroot-1\0.5658tw.com\Pier2\forumdetail.aspx.vb    行: 21

堆疊追蹤:


[OleDbException (0x80040e14): 查詢運算式 'main_id=  and  isopen='私密'' 中的 語法錯誤 (少了運算元)。]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) +1005708
   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.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +4
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +130
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +287
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1297
   System.Web.UI.WebControls.AccessDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +58
   System.Web.UI.WebControls.SqlDataSource.Select(DataSourceSelectArguments arguments) +19
   pt_forum_forumdetail.Page_Init(Object sender, EventArgs e) in D:\inetpub\wwwroot-1\0.5658tw.com\Pier2\forumdetail.aspx.vb:21
   System.Web.UI.Control.OnInit(EventArgs e) +99
   System.Web.UI.Page.OnInit(EventArgs e) +12
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378


版本資訊: Microsoft .NET Framework 版本:2.0.50727.8974; ASP.NET 版本:2.0.50727.8974