Server Error in '/' Application.

Incorrect syntax near ')'.

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.Data.SqlClient.SqlException: Incorrect syntax near ')'.

Source Error:


Line 504:            //fill the DataSet using default values for DataTable names, etc.
Line 505:            
Line 506:            da.Fill(ds);
Line 507:
Line 508:            // detach the SqlParameters from the command object, so they can be used again.

Source File: c:\inetpub\wwwroot\everythingrf\App_Code\SQLHelper.cs    Line: 506

Stack Trace:


[SqlException (0x80131904): Incorrect syntax near ')'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2582782
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +6033430
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +297
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4291
   System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +242
   System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +275
   System.Data.SqlClient.SqlDataReader.TryNextResult(Boolean& more) +296
   System.Data.SqlClient.SqlDataReader.NextResult() +29
   System.Data.ProviderBase.DataReaderContainer.NextResult() +20
   System.Data.Common.DataAdapter.FillNextResult(DataReaderContainer dataReader) +144
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +266
   System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +422
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +219
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +138
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +89
   Specpick.DL.SqlHelper.ExecuteDataset(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) in c:\inetpub\wwwroot\everythingrf\App_Code\SQLHelper.cs:506
   Specpick.DL.SqlHelper.ExecuteDataset(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) in c:\inetpub\wwwroot\everythingrf\App_Code\SQLHelper.cs:423
   Specpick.BL.ComponentsController.GetInternalTableData(Int32 nodeId, Int32 topCount, Int32 page, String nodeDbName, String whereQuery, Int32& partsCount, Int32& manuCount, String pnIds, String orderQry, Int32 pageIndex, Boolean isSingleManufacturer) in c:\inetpub\wwwroot\everythingrf\App_Code\ComponentsController.cs:710
   search_category.GetInternalPageData() in c:\inetpub\wwwroot\everythingrf\search\categories\category.aspx.cs:510
   search_category.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\everythingrf\search\categories\category.aspx.cs:147
   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.4330.0