I am using NHibernate with Progress OpenEdge 11.3 Update 2 ODBC Driver. The driver (or OpenEdge) does not allow parameters in offset\fetch clauses. The offset\fetch clause must contain fixed values. According to the documentation and this article: http://knowledgebase.progress.com/articles/Article/2916
Not allowed: select * from PUB.customer offset ? rows fetch next ? rows
Execption: ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL statement at or about "? rows fetch next ? rows only " (10713)
Allowed: select * from PUB.customer offset 10 rows fetch next 10 rows
How can I modify NHibernate's behaviour to use fixed values instead of parameters, when using Linq?
var customers = session.Query().Skip(10).Take(10).ToList();
Maybe someone can point me to the right direction. I have already downloaded the NHibernate sources and debugged them, but I could not find the right place to replace the parameters.
Thanks!