Home » Developer & Programmer » Forms » using of UTL_FILE PACKAGE
using of UTL_FILE PACKAGE [message #86790] Mon, 01 November 2004 20:48 Go to next message
Jamal Hashmi
Messages: 7
Registered: October 2004
Junior Member
Hi
I want to use utl_file pakage to get a file from the database or view it in the database as we view any file in harddisk.
regards.
using of UTL_FILE PACKAGE [message #86792 is a reply to message #86790] Tue, 02 November 2004 01:14 Go to previous messageGo to next message
Ani
Messages: 56
Registered: November 2000
Member
Hi,
pls set serveroutput on and try the below:

create or replace procedure utl_file_test_read (
path in varchar2,
filename in varchar2)
is
input_file utl_file.file_type;
input_buffer varchar2(4000);
begin
input_file := utl_file.fopen (path,filename, 'R');

utl_file.get_line (input_file, input_buffer);
dbms_output.put_line(input_buffer);
utl_file.get_line (input_file, input_buffer);
dbms_output.put_line(input_buffer);
utl_file.fclose(input_file);
--exception
-- when others then null;
end;

all the best

Ani
UTL_FILE PACKAGE giving error ora-06512 [message #86796 is a reply to message #86792] Tue, 02 November 2004 18:44 Go to previous message
Jamal Hashmi
Messages: 7
Registered: October 2004
Junior Member
1.Thx 4 ur reply.
but this procedure is giving error ora-06510,ora-06512
when i execute this. plz tell what format of path i should provided into. right now i am giving
(exec utl_file_test_read ('c:','123.txt');)

2.and plz tell how it work if i am taking any file (txt,doc,xls etc)stored in a database.

3.plz tell to save a file in the database what is the best option weather i save a file in the database or just its path.
Previous Topic: can anyone take a look and solve my problem? urgent plss
Next Topic: WIN_API_DIALOG.OPEN_FILE
Goto Forum:
  


Current Time: Sat Sep 07 15:51:05 CDT 2024