Accessing REF CURSOR in Stored Procedure from Qt
Hi,
I am trying to get array of data or cursor from a stored procedure in Oracle using Qt.
i.
CREATE TYPE NUM_ARRAY IS TABLE OF NUMBER;
CREATE OR REPLACE PROCEDURE GET_EMP_IDS(X OUT NUM_ARRAY) AS
BEGIN
SELECT ID BULK COLLECT INTO X from BKUP_EMPLOYEE;
END;
ii. RefCursor
CREATE OR REPLACE procedure GET_EMP_DETAILS(cur OUT SYS_REFCURSOR) as
begin
open cur for select * from bkupemployee;
end;
In Qt, i called QSqlQuery::execBatch(QSqlQuery::ValuesAsColumns), this execution succeeded
but iam not able to retreive the output from it.
query.boundValues(0).type returns int (zero).
Please help me in finding the solution.
Regards,
Suresh
Re: Accessing REF CURSOR in Stored Procedure from Qt
Re: Accessing REF CURSOR in Stored Procedure from Qt
Thanks for your reply.
Your information is helpful in deciding to go for alternatives.
By the way, passing/retreiving array of basic data (NUMBER) is possible or not?
It is mentioned in Qt documentation that QSqlQuery::execBatch(QSqlQuery::ValuesAsColumns) will send the data as array.
Re: Accessing REF CURSOR in Stored Procedure from Qt
I know that the last posting in this thread was some time ago...
We are not at Qt 4.x, and Oracle 11g.
It seems that calling a stored procedure and getting a result set back is such a rudimentary feature... How does one go about it with Oracle (REF CURSORs ? Are there any workarounds?
Thank you in advance.