utl_file.put_raw

Goffman

Member
Hello,
Is there any abilitity to write into BFile binary data using DOA?
There is implemented UTL_FILE.PUT_LINE, but PUT_RAW is not :(
 
Last edited:
To use utl_file.put_raw you can use a TOracleQuery with a corresponding PL/SQL Block:

Code:
begin
  utl_file.put_raw(:file_id, :raw_data);
end;

The :file_id variable is an integer holding the id of the file that was previously opened. The :raw_data is a string that holds the raw data in hexadeximal format.
 
Thanks,
But it doesnt work with :file_id
I made it like this

Code:
declare
  fh sys.utl_file.file_type;
begin
  fh:=utl_file.fopen(:directory,:file_path,'w');
  utl_file.put_raw(fh, :raw_data);
  utl_file.fclose(fh);
end;

 
Last edited:
Back
Top