Re: TEXT.IO
Date: 2000/03/02
Message-ID: <89mlqj$5rk$1_at_nnrp1.deja.com>#1/1
Hello Willem
In the online-Help of Forms 4.5 is an example of how to use text_io for reading from and writing to a file:
Using TEXT_IO Constructs
Below is an example of a procedure that echoes the contents of a file. Notice that the procedure includes several calls to TEXT_IO constructs:
PROCEDURE echo_file_contents IS
in_file TEXT_IO.FILE_TYPE;
linebuf VARCHAR2(80);
BEGIN
in_file := TEXT_IO.FOPEN('echo.txt', 'r');
LOOP
TEXT_IO.GET_LINE(in_file, linebuf); TEXT_IO.PUT(linebuf); TEXT_IO.NEW_LINE;
END LOOP;
EXCEPTION
WHEN no_data_found THEN
TEXT_IO.PUT_LINE('Closing the file...'); TEXT_IO.FCLOSE(in_file);
END; Copyright (c) 1994, Oracle Corporation.
I suggest you use the online-help searching for the keyword text_io. It is very straightforward, we use it frequently. Notice, however, that a programm unit using text_io can't be compiled on the server as stored proc. There you had to use utl_file (don't know if it's alread there in 7.3.3) that works slightly different. So the decision for client or server-side is important.
HTH
Pascal
In article <38bec154$0$93236_at_news2.zeelandnet.nl>,
"Willem Visser" <whvisser_at_zeelandnet.nl> wrote:
> Hello Everybody
>
> I want to make a button on a form, when you press this button the
table on
> the form must be converted to a text file.
>
> Now i heard about text.io, only I dont now how you can make this work.
> Is there somebody here who can help me with this problem.
> I work with Oracle Server 7.3.3 and Forms 4.5
>
> Many thanks Willem
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Mar 02 2000 - 00:00:00 CET