Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A text_io error: FRM-40735 causes ORA-302000 error

611286Dec 11 2007 — edited Dec 12 2007
Hi,all:

I'm trying to get data into forms with the text_io package,
but I get the message: Unhandled Exception ORA-302000:
Can anyone help me to solve this problem, Thanks.

Here's my code:

1.WHEN-BUTTON-PRESSED
-------------------------------------------------------------------------------
DECLARE
out_file text_io.file_type;
line_bufer varchar2(80);
lv_strtmp varchar2(100);
lv_content varchar2(100);
errnum NUMBER := ERROR_CODE;
errtxt VARCHAR2(80) := ERROR_TEXT;
errtyp VARCHAR2(3) := ERROR_TYPE;
BEGIN
message('111',acknowledge);
out_file := text_io.fopen('/home/cn01278/abc.txt', 'w');
message('222',acknowledge);
text_io.put('123');
text_io.new_line;
text_io.put_line(out_file, 'abcd...');
text_io.fclose(out_file);
END;

2.ON-ERROR Trigger
-----------------------------------------------------------------------------------
DECLARE
errnum NUMBER := ERROR_CODE;
errtxt VARCHAR2(80) := ERROR_TEXT;
errtyp VARCHAR2(3) := ERROR_TYPE;
BEGIN
message('error:',acknowledge);
Message(errtyp||'-'||TO_CHAR(errnum)||': '||errtxt,acknowledge);
--:blk_text.txt_err := errtyp||'-'||TO_CHAR(errnum)||': '||errtxt;
text_io.fclose(out_file);
RAISE Form_Trigger_Failure;
END;
-----------------------------------------------------------------------------------

But when i press the button(use text_io package to write),
it raise an exception, and the error message as below:
FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-302000.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2008
Added on Dec 11 2007
5 comments
9,480 views