create or replace package body pkg_nkw_hlp 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 -------------------------- ------------------------------------------------------------------ ------------------------------------------------------------------ -- GET_HELP ------------------------------------------------------------------ function get_help(fv_table in pkg_nkw_env.gv_char%TYPE) return pkg_nkw_env.gv_char%TYPE is retval pkg_nkw_env.gv_char%TYPE; begin if (fv_table is not null) then begin declare cursor get_cur is select b.comment$ from sys.com$ b, sys.obj$ a where (a.name = upper(fv_table)) and (a.obj# = b.obj#) and (b.col# is null); begin if (not get_cur%ISOPEN) then open get_cur; end if; fetch get_cur into retval; if (get_cur%ISOPEN) then close get_cur; end if; exception when others then if (get_cur%ISOPEN) then close get_cur; end if; raise; end; end; end if; return retval; exception when others then raise; end get_help; ------------------------------------------------------------------ function get_help(fv_table in pkg_nkw_env.gv_char%TYPE, fv_column in pkg_nkw_env.gv_char%TYPE) return pkg_nkw_env.gv_char%TYPE is retval pkg_nkw_env.gv_char%TYPE; begin if (fv_table is not null and fv_column is not null) then begin declare cursor get_cur is select c.comment$ from sys.com$ c, sys.col$ b, sys.obj$ a where (a.name = upper(fv_table)) and (a.obj# = b.obj#) and (b.name = upper(fv_column)) and (b.obj# = c.obj#) and (b.col# = c.col#); begin if (not get_cur%ISOPEN) then open get_cur; end if; fetch get_cur into retval; if (get_cur%ISOPEN) then close get_cur; end if; exception when others then if (get_cur%ISOPEN) then close get_cur; end if; raise; end; end; end if; return retval; exception when others then raise; end get_help; ------------------------------------------------------------------ -- GET_FRM_HELP ------------------------------------------------------------------ function get_frm_help(fv_module in pkg_nkw_env.gv_char%TYPE) return pkg_nkw_env.gv_char%TYPE is retval pkg_nkw_env.gv_char%TYPE; begin if (fv_module is not null) then begin declare cursor get_cur is select a.frm_comments from nkw_frm a where (a.frm_name = upper(fv_module)); begin if (not get_cur%ISOPEN) then open get_cur; end if; fetch get_cur into retval; if (get_cur%ISOPEN) then close get_cur; end if; exception when others then if (get_cur%ISOPEN) then close get_cur; end if; raise; end; end; end if; return retval; exception when others then raise; end get_frm_help; end pkg_nkw_hlp; / show errors