Dynamic sql and TOracleQuery

jabc

Member
I have been reading messages about this subject and I have the idea that you can't use a PL/SQL procedure with a Dynamic SQL and TOracleQuery for getting records, as you can with a PL/SQL procedure, a 'static' SQL and a Ref cursor.
First question: Am I right? (I don't want a procedure to create the Dynamic SQL which can be received in my Delphi client and then use it in a TOracleQuery component because, among others reasons, the SQL text travels thru the net twice ).
Second question: My current Oracle Server version is 8.0.6. Do you know if it is possible in Oracle 8i?. As far as I know dynamic sql are treated as Ref cursors.
Note.- I
 
To get a result set in a TOracleQuery or TOracleDataSet from a stored program unit, you need to have a cursor parameter. In Oracle 8.0 you are limited in what you can do with cursors, but in Oracle 8i you are very flexible. The following example returns a result set for the SQL text you pass to the procedure:
Code:
type untyped_cursor is ref cursor;

procedure open_cursor(p_sql in varchar2, p_cursor in out untyped_cursor) is
begin
  open p_cursor for p_sql;
end;
As far as I know, you cannot do something similar in 8.0.

------------------
Marco Kalter
Allround Automations
 
Back
Top