PKG_NKW_RPL.SPB
Source Package Body
Execução de PL/SQL Dinâmico.
create or replace package body pkg_nkw_rpl
timestamp '2006-07-07:10:10:10'
is
------------------------------------------------------------------
-- 2006 DataPRO Developers - m@urelio
------------------------------------------------------------------
-- Version: 2.0.2
------------------------------------------------------------------
-- Collections, Records, Variables, Constants, Exceptions, Cursors
------------------------------------------------------------------
------------------------------------------------------------------
----------------------- Private Section --------------------------
------------------------------------------------------------------
------------------------------------------------------------------
------------------------ Public Section --------------------------
------------------------------------------------------------------
------------------------------------------------------------------
-- RUN_CODE
------------------------------------------------------------------
procedure run_code(fv_stmt in pkg_nkw_env.gv_plchar%TYPE)
is
lv_cursor number;
lv_exec number;
lv_number number;
begin
if (fv_stmt is not null) then
lv_cursor := dbms_sql.open_cursor;
dbms_sql.parse(lv_cursor, fv_stmt, dbms_sql.native);
lv_exec := dbms_sql.execute(lv_cursor);
if (dbms_sql.is_open(lv_cursor)) then
dbms_sql.close_cursor(lv_cursor);
end if;
end if;
exception
when others then
if (dbms_sql.is_open(lv_cursor)) then
dbms_sql.close_cursor(lv_cursor);
end if;
raise;
end run_code;
end pkg_nkw_rpl;
|