Question: I want to be able to
read and write to a PC client using text_io. I cannot
use utl_file because I do not have Oracle database installed
on the remote client. How do I invoke text_io?
Answer:
The Oracle text_io package can write to the
local machine rather than server side (such as utl_file).
Here is an example of using the text_io utility to
write across platforms. This is invoked from the
Oracle server and writes to the connected remote PC client:
declare
l_out_file text_io.file_type;
begin
l_out_file := text_io.fopen( 'c:\text.txt',
'w' ); -- w is write, r is read
text_io.put (l_out_file, 'New text' );
text_io.new_line( l_out_file, 1 ); -- 1
new line
text_io.fclose( l_out_file );
end;/
Also see related cross platform file tool articles:
utl_http: See
using utl_http for cross platform uploading data from a PC into Oracle.
utl_file: You can read and write
files across platforms if you use