Skip to main content
Solved

Error when using cardlist


When I use a cardlist to display information in Universal, I get an error as follows:

 

2021-06-17T09:59:28.9376037+02:00 80000036-0001-f400-b63f-84710c7967bb [ERR] TSFMessagesMiddleware: An unhandled exception occurred while processing the request. (fffadd8a)
Microsoft.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'.
Invalid usage of the option NEXT in the FETCH statement.
   at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__188_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Indicium.Data.Shared.Connection.DbCommandExtensions.<>c__DisplayClass3_0.<<ExecuteReaderWithMessages>b__0>d.MoveNext() in C:\azp\agent\_work\1\s\src\Data\Indicium.Data.Shared\Connection\DbCommandExtensions.cs:line 85
--- End of stack trace from previous location ---
   at Indicium.Data.Shared.Connection.DbCommandExtensions.WithLogging[T](DbCommand command, String userID, Func`1 action) in C:\azp\agent\_work\1\s\src\Data\Indicium.Data.Shared\Connection\DbCommandExtensions.cs:line 113
   at Indicium.Data.Shared.Connection.DbCommandExtensions.ExecuteReaderWithMessages(DbCommand command, String userID, TSFMessageHandler messageHandler, CommandBehavior commandBehaviour, Action`3 processError) in C:\azp\agent\_work\1\s\src\Data\Indicium.Data.Shared\Connection\DbCommandExtensions.cs:line 97
   at Indicium.Data.SQLServer.SQLDataProvider.ExecuteReader(DbCommand command, CommandBehavior commandBehavior) in C:\azp\agent\_work\1\s\src\Data\Indicium.Data.SQLServer\SQLDataProvider.cs:line 185
   at Indicium.Data.Shared.TSFDbDataProvider.GetDataReader(QueryBase query) in C:\azp\agent\_work\1\s\src\Data\Indicium.Data.Shared\TSFDbDataProvider.cs:line 190
   at Indicium.Controllers.TableController.Get() in C:\azp\agent\_work\1\s\src\Indicium\Controllers\TableController.cs:line 152
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
   at Indicium.Middleware.Security.AuthenticationHeadersMiddleware.InvokeAsync(HttpContext context) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\Authentication\AuthenticationHeadersMiddleware.cs:line 40
   at Indicium.Middleware.Security.SecurityHeadersMiddleware.InvokeAsync(HttpContext context, ContentSecurityPolicyBuilder cspBuilder) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\Security\SecurityHeadersMiddleware.cs:line 43
   at Indicium.Middleware.Messages.TSFMessagesMiddleware.Invoke(HttpContext context, TSFRequestContext requestContext) in C:\azp\agent\_work\1\s\src\Indicium\Middleware\Messages\TSFMessageMiddleware.cs:line 68
ClientConnectionId:ec222abd-554b-41ef-b9a2-28ffe09adf54
Error Number:102,State:1,Class:15
2021-06-17T10:00:00.0383625+02:00  [ERR] Process action 'http_connector' was not provided a (valid) value for its 'URL' parameter. (0680995c)

 

How to work around this? I am using a view with two columns. The first column is an id, the second column is a name.

Best answer by Marieke

There was no primary key defined for the view. Now it has a primary key, it works fine!

View original
This topic has been closed for comments

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi, 

"Microsoft.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'.
Invalid usage of the option NEXT in the FETCH statement.”

I think the code in your view is causing this error. Could you check this?


  • Sidekick
  • June 17, 2021

SELECT        bericht_id AS id, naam_01 AS naam
FROM            dbo.jw301_clientrecord

 

I can't imagine a simpler query than this


  • Sidekick
  • June 17, 2021

There was no primary key defined for the view. Now it has a primary key, it works fine!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings