Re: Read a File into Forms4.5 and Display it

From: Daniel Poweleit <powi_at_horn-goerwitz.de>
Date: 1997/05/06
Message-ID: <01bc59e8$7fef3880$8c8765c1_at_dpoweleit.horn-goerwitz.de>#1/1


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);

END; aloha

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 CEST

Original text of this message