You are not logged in.
Hi,
we are migrating the database layer of our existing legacy application to mORMot, mainly using the compatibility class TQuery.
For accessing the database we use FireDAC as we also utilize the oracle events feature (DBMS_ALERT).
Running our own testcases we experienced a problem using query parameters if null values are involved. FireDAC complains that the datatype is not defined.
Especially if the query is cached it can happen that a parameter is null the first time, and of correct value the next time the query is executed.
Finally we fixed it on our side by calling a template method in procedure TQuery.Execute(ExpectResults: Boolean); before the actual parameter binding takes place. In this template method we set the actual data type of the original FireDAC parameter instance. We know the parameter types anyways, as in our existing code the parameters had been declared explicitly.
Maybe there is also another possible approach to fix it.
Best regards,
Matt
Offline