Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic PL/SQL Question - Will This Solution Work?

Re: Dynamic PL/SQL Question - Will This Solution Work?

From: Keith Jamieson <Keith.Jamieson_at_phoenix.ie>
Date: Wed, 17 Jan 2001 11:26:41 -0000
Message-ID: <943vmp$t07$1@kermit.esat.net>

Here is what I have discovered:

It depends on whether you are using an ODBC or OLE connection. If you are using ODBC, then you will have to populate a plsq table with the results. You will then be able to return them to ADO. The problem with this approach, is that you have top specify the maximum no of records expected to be returned.

With OLE, you use ref cursors. You cannot manipulate the results of the query before returning it.
As far as I can see, you can do one or the other but not both.

Also, there is a performance overhead with using dynamic sql.

contrapositive wrote in message <94330i$v4v$1_at_nnrp1.deja.com>...
>Can someone review this solution and tell me if they see any problems:
>
>My database (7.3) will store in a field an anonymous block of PL/SQL
>code - something of the form "BEGIN ... END;" Using ADO, we will send
>this string as a parameter to a procedure or function. The procedure or
>function will execute the block of code (using DBMS_SQL maybe?) and
>return its results.
>
>Most times, the block of code will just be a query. But occasionally it
>may have conditional and iterative (looping) logic, and possibly
>variables (is that possible?).
>
>The code needs to be in the database and is not a dedicated procedure
>of its own, because it will need to be "editable" via an interface.
>
>Can anyone make any comments or recommendations? Is there a better way?
>Thanks in advance...
>
>-jk
>
>
>Sent via Deja.com
>http://www.deja.com/
Received on Wed Jan 17 2001 - 05:26:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US