Home » Server Options » Text & interMedia » Re: how to insert into a blob/raw column a ..doc/.xml using PL/SQL
Re: how to insert into a blob/raw column a ..doc/.xml using PL/SQL [message #75890] Fri, 23 November 2001 09:25
Xavier PLOT-CHADOUTAUD
Messages: 1
Registered: November 2001
Junior Member
procedure proc_load_bin_conf_inse(
cdrf in VARCHAR2,
action in VARCHAR2,
parent_fullname in VARCHAR2,
name in VARCHAR2,
fichier in VARCHAR2,
class_id in NUMBER,
message_id in NUMBER,
default_message in VARCHAR2,
definition in VARCHAR2,
entity_comment_type in VARCHAR2,
entity_type in VARCHAR2)

IS

longeur integer := 0;
b_lob dd_pack.tab_configuration_inse.value_binary%type;
code_sub dd_pack.tab_configuration_inse.code_sub%type;
sub_component dd_pack.tab_configuration_inse.sub_component%type;
dummy number;
file bfile;

BEGIN

select code_sub,sub_component into code_sub, sub_component from dd_pack.dcrf_inse where crdf = cdrf;

delete from tab_configuration_inse where cdrf=cdrf and name=name and parent_fullname=parent_fullname and action=action;

insert into tab_configuration_inse values(class_id, code_sub, default_message, definition, entity_comment_type,
entity_type, message_id, name, sub_component, null, null, null, null, null, action, null, parent_fullname,
empty_blob(), cdrf)
return value_binary into b_lob;

file:= bfilename('LOB_PATH',fichier);
DBMS_LOB.FILEOPEN(file, DBMS_LOB.FILE_READONLY);

longeur := dbms_lob.getlength(file);

DBMS_LOB.loadfromfile(b_lob, file, longeur);

DBMS_LOB.FILECLOSE(file);

commit;

END;

----------------------------------------------------------------------
Previous Topic: Re: Problem installing Oracle comUnity
Next Topic: Re: PDE error-message!
Goto Forum:
  


Current Time: Wed Jul 23 04:54:31 CDT 2014

Total time taken to generate the page: 0.11653 seconds