I am trying to query or update a database using a parameterized query. Below is a mocked up example
var todaysDate = new java.util.Date()
var pQuery = qie.getParameterizedQuery("SELECT givenDate FROM MediTable WHERE recordUpdated = :dateOfLastUpdate");
pQuery.setObject("dateOfLastUpdate", todaysDate);
pQuery.doQuery();
The above code is causing this error when the doQuery() is executed.
com.qvera.qie.exception.NoResultsException: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from UNKNOWN to UNKNOWN is unsupported.
I was hoping to use setObject in another query to dynamically set fields of various datatypes but it breaks when I pass in a date. Is there a way to fix this?