text_io - [ora-302000] [message #156036] |
Fri, 20 January 2006 07:00 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vban2000
Messages: 207 Registered: March 2005
|
Senior Member |
|
|
The following are code done in
Oracle 9i Relase 2
9i Forms
O/s: Sun Solaris
DECLARE
out_file text_io.file_type;
line_bufer VARCHAR2 (80);
BEGIN
out_file := text_io.fopen ('/user/andy/test123.txt', 'W');
text_io.put ('123');
text_io.new_line;
text_io.put_line (out_file, 'abcd...');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
text_io.put_line ('CLOSING THE FILE ,PLEASE WAITING....');
text_io.fclose (out_file);
END;
This fails.. give the following error:
FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ora-302000. when query on the internet it says its a generic error.
however, when I created a file on the server (/user/andy/test123.txt) - { it still fail at this point. } and I grant 777 to the test123.txt. the program worked.
I would like to know if this a bug somewhere in the code, or is it required to have text file created before it write.
The program should be able to write to the file, even if there is no such file exists on the server.
Please, any advice, suggestion, idea, direction would be appreicated.
Thanks.
|
|
|
|
|