OQL using parameters for limit and offset

0
Hallo everyone, In mendix 7.23.11 i’m trying to create a Dataset using OQL query. My query works but now i’m trying to use parameters to set the limit and offset. this works: LIMIT 10 OFFSET 10 Unfortunately this doesn’t: LIMIT $LIMIT OFFSET $OFFSET I get the following error:  mismatched input ‘$LIMIT’ expecting NATURAL Can somebody tell me what i’m missing here?
asked
2 answers
1

Maybe replacing value parameters is just not implemented for Limit and Offset. See https://apidocs.rnd.mendix.com/7/runtime/com/mendix/core/Core.html#createOQLTextGetRequestFromDataSet-java.lang.String- for the location of the Java-code, which is called by createOQLTextGetRequest() in OQL.java:

47	public static Long countRowsOQL(IContext context, String statement, Long amount, Map<String, Object> parameters)
48		throws CoreException {
49		IOQLTextGetRequest request = Core.createOQLTextGetRequest();

maybe it is an option to Deploy for Eclipse (F6) and debug your way through the code. Maybe change OQL.java yourself to insert the parameters into the OQL (having to re-implement this modification when you upgrade your OQL module (if ever)).

answered
0

Hi Jeff

Could you retry and follow the steps documented in here: Use Mendix Data Storage APIs to Build Reusable Microflow Actions - Studio Pro 9 How-to's | Mendix Documentation

I hope this helps!

Kind regards,

Leander

answered