Re: Dynamic SQL

From: Sorokin Anton (Mocow) <"Sorokin>
Date: Thu, 6 Apr 2000 10:39:40 +0400
Message-ID: <8chbfb$9ka$1_at_pechkin.menatep.spb.ru>


  A'm using universal procefure in FORMS:

procedure DDL_PROCEDURE

( SQL_TEXT  in varchar2,                  /* full SQL text */
  ERR  out varchar2                            /*  ERROR code */
) is
DDL_CURSOR          number;
RETURNED                number;

begin

  DDL_CURSOR := dbms_sql.open_cursor;

    dbms_sql.parse(DDL_CURSOR, SQL_TEXT, 2);

    RETURNED := dbms_sql.execute(DDL_CURSOR);

    dbms_sql.close_cursor(DDL_CURSOR);
    ERR := '00'; exception

   when OTHERS then

     dbms_sql.close_cursor(DDL_CURSOR);
     ERR := 'Create_Object ERROR ! '||SQLERRM;

end DDL_PROCEDURE; Received on Thu Apr 06 2000 - 08:39:40 CEST

Original text of this message