Problem with pagination in dataGrid2 for external database

0
I have a Mendix application (version 11.0.0) in which I want to use a “Query external database” to display a dataGrid2 with data from anOracle DB table (Oracle 19c). The table contains a very large number of records, so I want to use pagination.I have set the PageSize to 20 in the dataGrid2. The data is retrieved via a microflow, which is specified as the data sourcein the dataGrid2.My SELECT statement looks like this:select * from S4_LABELREVISIONORDER BY last_mod_date descOFFSET :offsetparam ROWSFETCH NEXT :limitparam ROWS ONLYThe microflow has two parameters: Offset and Limit. In the ‘Execute Query’ action, the two parameters `offsetparam` and `limitparam`are populated with the values from the microflow parameters (i.e. `offsetparam` = $Offset and `limitparam` = $Limit).However, the microflow parameters never seem to be populated; at runtime, the error “Missing IN or OUT parameter at index:: 1”is displayed. What settings need to be configured so that dataGrid2 populates these two parameters?
asked
2 answers
0

The pagination controls in Data Grid 2 work natively when the datasource supports paging, but for a custom Query External Database implementation, you typically need to handle the paging logic yourself.


A couple of things to check:

  • Can you share a screenshot of the microflow parameters and the Data Grid 2 datasource configuration?
  • Does the query work if you hardcode values for OFFSET and FETCH NEXT?


The error:

Missing IN or OUT parameter at index:: 1

usually indicates that Oracle is expecting a bind parameter that is not being supplied at execution time, which suggests that :offsetparam and/or :limitparam are not being populated at all.


From my experience, Data Grid 2 does not automatically pass paging parameters into a custom microflow for a Query External Database action. You may need to implement paging manually.


Could you share the microflow and datasource configuration screenshots for better understanding?

answered
0

Thanks for your reply. That's exactly what I had suspected. The DataGrid2 doesn't provide the two parameters for offset and limit.

How can this problem be solved manually? Or are there other ideas for handling external tables with over 100,000 records?

answered