I am using the QOCI binding to connect Qt with an Oracle 10g database. The code is really simple:
QSQLQuery sqlQuery = QSQLQuery(database);
sqlquery.prepare(querystring);
sqlQuery.exec();
Now if querystring is only one line, it works:
select * from dual
But if it contains multiple lines, I get an ORA-911 invalid character:
select *
from dual
I have a lot of queries spanning multiple lines, so this is quite a problem. Just removing newlines in Qt is not an option, because the queries contain end-of-line comments ("--").
Any suggestions how I can execute these multi-line queries?