Pergunta

Is it possible to fetch raw DB output of an Oracle DB within a QSqlQuery, e.g. by something like this:

QSqlQuery sqlQuery;
sqlQuery.prepare("exec dmbs_output.put_line('hello world');");
sqlQuery.exec();

Now I would like to access the output ('hello world' in this example).

Foi útil?

Solução

Assuming that you have configured the buffer that DBMS_OUTPUT writes to by calling DBMS_OUTPUT.ENABLE earlier, you should be able to use the DBMS_OUTPUT.GET_LINE or GET_LINES procedure to fetch data from the buffer.

I'm not an expert with the QT libraries, but here is an example of calling a stored procedure that returns a collection in Qt that would appear to be what you'd need to do in order to call the GET_LINES procedure.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top