Re: More of the ongoing battle with dbms_sql

From: Ramesha H.G. Bhatta <r4hbhat_at_pacbell.com>
Date: 1996/09/13
Message-ID: <51c1fp$g4_at_gw.PacBell.COM>#1/1


Hi,

DBMS_SQL gives way to execute DDL commands and other DML SQL Commands only. You cannot execute PL/SQL Code dynamically. One simple reason is you cannot pass a procedure or function name as parameter.

Only way you can achieve this by writing a Pro*C code which prepares a plain script and executes by forking a new oracle session.

Hope this helps.

Ramesha H.G.

Brian Martin <icbkr_at_ix.netcom.com> wrote:
>Here's the example code:
>create or replace package body bcm as
>procedure exec is
> mcursor integer;
> mstring varchar2(80);
> mreturn integer;
>begin
> mcursor := dbms_sql.open_cursor;
> mstring := 'bcm.dummy'; /* le prog to run */
> dbms_sql.parse(mcursor, mstring, dbms_sql.v7);
> mreturn := dbms_sql.execute(mcursor);
> dbms_sql.close_cursor(mcursor);
>end exec;
Received on Fri Sep 13 1996 - 00:00:00 CEST

Original text of this message