Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic SQL
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 - 00:00:00 CDT