Server Error in '/' Application.

Incorrect syntax near the keyword 'where'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Incorrect syntax near the keyword 'where'.

Source Error:


Line 1056:        string sql = "select * from " + _table + " where 1=1 " + _sqlwhere; //从分类表里面查找页面key,title,desc
Line 1057:        //Response.Write(sql);
Line 1058:        DataTable dt = Utility.DbHelperSQL.DataSet(sql).Tables[0];
Line 1059:        if (dt.Rows.Count > 0)
Line 1060:        {

Source File: c:\WebEononIT\EononComIT\productList.aspx.cs    Line: 1058

Stack Trace:


[Exception: Incorrect syntax near the keyword 'where'.]
   Utility.DbHelperSQL.DataSet(String SQLString) +264
   productList.GetHead(String type1, String type2) in c:\WebEononIT\EononComIT\productList.aspx.cs:1058
   productList.Page_Load(Object sender, EventArgs e) in c:\WebEononIT\EononComIT\productList.aspx.cs:193
   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


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0