Home » Developer & Programmer » Forms » text_io syntax
text_io syntax [message #79175] Fri, 10 May 2002 01:08 Go to next message
Rich Anthony
Messages: 1
Registered: May 2002
Junior Member
What is the correct text_io syntax I would need to use to output the value of a variable to an external file. I am wanting to put the code into a pre query block level trigger.
Re: text_io syntax [message #79194 is a reply to message #79175] Tue, 14 May 2002 14:57 Go to previous message
Srinivas Konda
Messages: 29
Registered: October 2001
Junior Member
Using TEXT_IO constructs example

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(1800);
filename VARCHAR2(30);
BEGIN
filename:=GET_FILE_NAME('c:temp', File_Filter=>'Text Files (*.txt)&#124*.txt|');
in_file := Text_IO.Fopen(filename, 'r');
LOOP
Text_IO.Get_Line(in_file, linebuf);
:text_item5:=:text_item5||linebuf||chr(10);
--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;
Previous Topic: read a file (of any type from client) & store it in OS -Filesystems of the server
Next Topic: ODBC Connectivity of Access with 6i or 8i
Goto Forum:
  


Current Time: Mon Aug 03 05:19:30 CDT 2020