Server Error in '/' Application.

Incorrect syntax near the keyword 'FROM'.

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 the keyword 'FROM'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SqlException (0x80131904): Incorrect syntax near the keyword 'FROM'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2073422
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5063564
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +86
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteReader() +89
   OnlineBins.Products.BuildGrid(String sSQLSearch, Int32 iLayoutID, Int32 iSubCatID, String sGridType, Int32 iGridSetupID) in C:\Users\Brian\Documents\Visual Studio 2010\Projects\OnlineBins\OnlineBins\Products.aspx.vb:1241
   OnlineBins.Products.LoadGrid(Int32 iLayoutID, Int32 iSubCatID, Int32 iPrimaryGridSetupID, Int32 iSecondaryGridSetupID, Int32 iTertiaryGridSetupID, Int32 iQuaternaryGridSetupID) in C:\Users\Brian\Documents\Visual Studio 2010\Projects\OnlineBins\OnlineBins\Products.aspx.vb:310
   OnlineBins.Products.SetPage() in C:\Users\Brian\Documents\Visual Studio 2010\Projects\OnlineBins\OnlineBins\Products.aspx.vb:51
   OnlineBins.Products.Page_Load(Object sender, EventArgs e) in C:\Users\Brian\Documents\Visual Studio 2010\Projects\OnlineBins\OnlineBins\Products.aspx.vb:28
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


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