| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Read a File into Forms4.5 and Display it
Hi Jenny!
You have to insert something like that into your W-B-P-trigger:
DECLARE
in_file TEXT_IO.FILE_TYPE;
f_eof boolean:=FALSE;
linebuf VARCHAR2(1024):=NULL;
BEGIN
:block.multiline_textfield:=NULL;
in_file := TEXT_IO.FOPEN('/home/usr/file.txt','r');
LOOP
BEGIN
TEXT_IO.GET_LINE(in_file, linebuf);
f_eof:=FALSE;
EXCEPTION
WHEN others THEN
f_eof:=TRUE;
END;
exit when f_eof;
:block.multiline_textfield:=:block.multiline_textfield||CHR(10)||linebuf;
END LOOP;
TEXT_IO.FCLOSE(in_file);
Jenny Farnham <farnham_at_spot.Colorado.EDU> schrieb im Beitrag
<5klopt$sq_at_lace.colorado.edu>...
> In Unix, I have a 5 line text file. The file would
> always be 80 characters or less per line.
>
> I would like to somehow read this file and display
> it to the user when the user presses a button on a form
> in Forms 4.5
>
> Anybody have an idea how to do this? Do I need to use the TEXT_IO
> program unit that is built into forms?
>
> Thanks,
> Jennifer
> Boulder, Colorado
>
>
Received on Tue May 06 1997 - 00:00:00 CDT
![]() |
![]() |