Creating a text file in PL/SQL ( Urgent !!!!!!!!!!!!!) [message #39978] |
Thu, 29 August 2002 22:35 |
kiran
Messages: 503 Registered: July 2000
|
Senior Member |
|
|
Hi all,
I facing a problem in creating textfile from within my pl/sql block, Please go thru the code and tell me am i have to set any thing else(should i have the permission to create a file or is it default?)
The code is as follows
Set Serveroutput On
DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('UTL_FILE_TEST', 'test.txt', 'w');
UTL_FILE.PUTF(fileHandler, 'Hi Look at this, I''m writing to a file!!!n');
UTL_FILE.FCLOSE(fileHandler);
EXCEPTION
WHEN utl_file.invalid_path THEN
raise_application_error(-20000, 'ERROR: Invalid path for file or path not in INIT.ORA.');
END;
The error I'm getting is
ERROR at line 1:
ORA-20000: ERROR: Invalid path for file or path not in INIT.ORA.
ORA-06512: at line 9
reply immdtly
ThanQ
|
|
|
|