Incorrect syntax near 'ProductLoadAllPaged'.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Hello Guys,

I download new version of nopcommerce 3.6 and install on my machine successfully. I run the application from VS 2013, home page is showing fine but when I click on any inner page like category, product then it gives me this error "ProductLoadAllPaged" error... Below is the complete stack trace.
I hope anyone from the groups can help me to solve my issue

I am using VS 2013 and SQL SERVER 2008 Express Edition.


var result = this.Database.SqlQuery<TEntity>(commandText, parameters).ToList();
Line 129:
Line 130:            //performance hack applied as described here - https://www.nopcommerce.com/boards/t/25483/fix-very-important-speed-improvement.aspx

[SqlException (0x80131904): Incorrect syntax near 'ProductLoadAllPaged'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +1787882
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5341766
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1693
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +61
   System.Data.SqlClient.SqlDataReader.get_MetaData() +90
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +377
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +1421
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +177
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +53
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +137
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +41
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext`1 c) +9
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +72
   System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext) +355
   System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior) +166
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQueryInternal(String commandText, String entitySetName, ExecutionOptions executionOptions, Object[] parameters) +260
   System.Data.Entity.Core.Objects.<>c__DisplayClass65`1.<ExecuteStoreQueryReliably>b__64() +45
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +288
   System.Data.Entity.Core.Objects.<>c__DisplayClass65`1.<ExecuteStoreQueryReliably>b__63() +170
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +189
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQueryReliably(String commandText, String entitySetName, ExecutionOptions executionOptions, Object[] parameters) +458
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQuery(String commandText, ExecutionOptions executionOptions, Object[] parameters) +61
   System.Data.Entity.Internal.<>c__DisplayClass14`1.<ExecuteSqlQuery>b__13() +145
   System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() +45
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +381
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
   Nop.Data.NopObjectContext.ExecuteStoredProcedureList(String commandText, Object[] parameters) in c:\Users\ibrahim.zoaib\Desktop\Mystyle\nopCommerce_3.60_Source\Libraries\Nop.Data\NopObjectContext.cs:128
   Nop.Services.Catalog.ProductService.SearchProducts(IList`1& filterableSpecificationAttributeOptionIds, Boolean loadFilterableSpecificationAttributeOptionIds, Int32 pageIndex, Int32 pageSize, IList`1 categoryIds, Int32 manufacturerId, Int32 storeId, Int32 vendorId, Int32 warehouseId, Nullable`1 productType, Boolean visibleIndividuallyOnly, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 productTagId, String keywords, Boolean searchDescriptions, Boolean searchSku, Boolean searchProductTags, Int32 languageId, IList`1 filteredSpecs, ProductSortingEnum orderBy, Boolean showHidden, Nullable`1 overridePublished) in c:\Users\ibrahim.zoaib\Desktop\Mystyle\nopCommerce_3.60_Source\Libraries\Nop.Services\Catalog\ProductService.cs:642
   Nop.Services.Catalog.ProductService.SearchProducts(Int32 pageIndex, Int32 pageSize, IList`1 categoryIds, Int32 manufacturerId, Int32 storeId, Int32 vendorId, Int32 warehouseId, Nullable`1 productType, Boolean visibleIndividuallyOnly, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 productTagId, String keywords, Boolean searchDescriptions, Boolean searchSku, Boolean searchProductTags, Int32 languageId, IList`1 filteredSpecs, ProductSortingEnum orderBy, Boolean showHidden, Nullable`1 overridePublished) in c:\Users\ibrahim.zoaib\Desktop\Mystyle\nopCommerce_3.60_Source\Libraries\Nop.Services\Catalog\ProductService.cs:380
   Nop.Web.Controllers.CatalogController.Category(Int32 categoryId, CatalogPagingFilteringModel command) in c:\Users\ibrahim.zoaib\Desktop\Mystyle\nopCommerce_3.60_Source\Presentation\Nop.Web\Controllers\CatalogController.cs:538
   lambda_method(Closure , ControllerBase , Object[] ) +146
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +156
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22
   System.Web.Mvc.Async.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39
   System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +28
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +54
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651156
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
8 years ago
Any one ?
8 years ago
Hi,
I Have same problem with v3.70.
Have you solved the issue?
8 years ago
Normally it is a rear case with fresh nopcommerce. It should not happen. Whatever so far I understand that this error may happen, when system try to execute "ProductLoadAllPaged" store procedure at product service. There may have many reason why system can not execute the store procedure. I have faced this issue when I updated nopcommerce version from 2.7 to 3.4. To get ride of this problem first thing I did that is I went to admin panel and then went to Configuration==>Setting==>All Setting(advanced) and at setting name search with "StoredProcedure" and I get "commonsettings.usestoredproceduresifsupported" make it False, by default it was True.By doing this the error was disappear but performance became very slow. You can try this may it helps you.

So the summery is go to Configuration==>Setting==>All Setting(advanced) and make the value False then see is it helps you or not.

It is the initial try if problem solve then need to do more thing first try it.
8 years ago
See this topic
https://www.nopcommerce.com/boards/t/29464/v330-incorrect-syntax-near-productloadallpaged-when-trying-to-view-a-product.aspx?p=3

Bottom line: it looks like if you're using 2008 Express, then you need to modify the source code to add "Exec".
7 years ago
sina.islam wrote:
Normally it is a rear case with fresh nopcommerce. It should not happen. Whatever so far I understand that this error may happen, when system try to execute "ProductLoadAllPaged" store procedure at product service. There may have many reason why system can not execute the store procedure. I have faced this issue when I updated nopcommerce version from 2.7 to 3.4. To get ride of this problem first thing I did that is I went to admin panel and then went to Configuration==>Setting==>All Setting(advanced) and at setting name search with "StoredProcedure" and I get "commonsettings.usestoredproceduresifsupported" make it False, by default it was True.By doing this the error was disappear but performance became very slow. You can try this may it helps you.

So the summery is go to Configuration==>Setting==>All Setting(advanced) and make the value False then see is it helps you or not.

It is the initial try if problem solve then need to do more thing first try it.


Thank you very much, it helped me!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.