[red face]
I have been trying to figure this out for ages... just installed qtcreator 1 and found a new error message from the running of the system.

Turns out that I split the sql into two strings in the prepare statement and consequently missed a space between two key words...
[/red face]

Now works as advertised.