Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Output data fr Oracle Table to Ascii File in Form 4.5
Thank you all 4 replying.
Soln :
A) Use Text_IO Package B) Use editor to remove the control character (char) C) Use Report but top and bottom margins = 0. Then make a newprinter def to turn the formfeed char into a carriage return. D) In sqlplus ......
Anyway, I use Sol A, it works BUT see below
My data is to be output to file C:\FILEDIR\FILENAME.DAT. In my Form 4.5 Trigger -> When-button-pressed
PROCEDURE PROCEDURE_NAME IS
FILE_OUT TEXT_IO.FILE_TYPE := 'C:\FILEDIR\FILENAME.DAT';
BEGIN
/* ...*/
EXCEPTION
WHEN OTHERS THEN
/* HANDLE ERROR */
END;
However, if the directory FILEDIR does not exist,
I will have exception FRM-40735:WHEN-BUTTON-PRESSED
TRIGGER RAISED UNHANDLED EXCEPTION ORA-3020000
Oracle always bypasses my error handler.
However, if I will to change my proc to
FILE_OUT TEXT_IO.FILE_TYPE ;
BEGIN
FILE_OUT := 'C:\FILEDIR\FILENAME.DAT';
My error handler will be activated BUT ERRNUM= 0 & ErrType and
ERRCODE will be null.
Any help ?
Thanks.
ChorLing
chancl_at_nievax.nie.ac.sg
Received on Tue Mar 05 1996 - 06:09:16 CST
![]() |
![]() |