日期:2014-05-17  浏览次数:20453 次

网站的log.txt,爆这样的错误,要怎么维护啊。
System.Data.SqlClient.SqlException: ',' 附近有语法错误。
关键字 'as' 附近有语法错误。
关键字 'as' 附近有语法错误。
关键字 'as' 附近有语法错误。
关键字 'as' 附近有语法错误。
关键字 'as' 附近有语法错误。
')' 附近有语法错误。
  在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
  在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
  在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
  在 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
  在 System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
  在 System.Data.SqlClient.SqlDataReader.get_MetaData()
  在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
  在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
  在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
  在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
  在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
  在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
  在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
  在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
  在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
  在 LHZ.Website.Common.Utility.SqlHelper.FillDataset(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, DataSet dataSet, String[] tableNames, SqlParameter[] commandParameters)
  在 LHZ.Website.Common.Utility.SqlHelper.FillDataset(SqlConnection connection, CommandType commandType, String commandText, DataSet dataSet, String[] tableNames, SqlParameter[] commandParameters)
  在 LHZ.Website.Common.Utility.SqlHelper.FillDataset(String connectionString, CommandType commandType, String commandText, DataSet dataSet, String[] tableNames, SqlParameter[] commandParameters)
  在 LHZ.Website.ProductList.DAL.ProductDAL.GetProductListByCondition(Int32 CategoryID, Int32 BrandID, Int32 Page, Int32 PageSize, String SortCol, Int32 ProductGroupID, Int32 ProductTypeID, String keywords, Int32 sex, Int32 style, String colorname, Decimal pricefrom, Decimal priceto, Int32 tagID, Int32& TotalNum)
  在 LHZ.Website.ProductList.BLL.ProductBLL.GetProductListByCondition(Int32 CategoryID, Int32 BrandID, Int32 Page, Int32 PageSize, String SortCol, Int32 ProductGroupID, Int32 ProductTypeID, String keywords, Int32 sex, Int32 style, String colorname, Decimal pricefrom, Decimal priceto, Int32 tagID, Int32& TotalNum) 2012-3-31 11:13:01


通过log.txt 我知道 是GetProductListByCondition这个方法下调用的FillDataset方法调用的...(省略N个方法)最终导致了System.Data.SqlClient.SqlConnection.OnError的异常。
可能是输入参数,或者查询条件有问题,但是问题来了,我不知道哪里有错误,哪个参数 没