Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPQL produces SQL syntax error on Informix, but only because of PreparedStatement binding?

On Mon, Feb 25, 2013 at 5:34 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
  I'm not sure what could be wrong with Informix's handling of that parameter binding.

Indeed.  We've definitely narrowed it down to some fundamental flaw in Informix.  Specifically, it seems to be the THEN keyword's...operand, value, whatever.  If you change that parameter slot to a numeric literal ("THEN ?" to "THEN 1") then under a simple JDBC unit test everything works.  Reintroduce that slot and it blows up.
 
 'some things you could experiment with to narrow it down/work around.

- Persistence unit property: eclipselink.jdbc.bind-parameters=false to turn off parameter binding
- Persistence unit property: eclipselink.logging.parameters=true combined with a logging level of FINE or better will log the parameters being bound so you can see if there are any issues with what is being bound
- Query Hint: eclipselink.jdbc.bind-parameters=false to turn off parameter binding on a query-by-query basis
- DatabasePlatform.setUsesStringBinding(boolean) set whether string values are bound
- DatabasePlatform.setShouldBindLiterals(boolean) set whether literals are bound

Ah, these are good suggestions.  Thanks.  I'm also working this with the Informix users' group and will report back what I find there.

Best,
Laird

--
http://about.me/lairdnelson

Back to the top