Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> UTL_FILE.PUT_LINE doesnt work properly in 8i
I have been trying the UTL_FILE package in 8i using the new optional line
size parameter in the FOPEN command.
It appears to me that when you open the file and specify a size only PUT will work PUT_LINE doesnt write anything to the file.
To test I ran this code
declare
fileid UTL_FILE.FILE_TYPE := UTL_FILE.FOPEN
('D:\ORADBA\ADMIN\TT\UTL_FILE\', 'test.txt', 'W', 2000);
BEGIN
UTL_FILE.PUT_LINE(fileid,'Test Text');
UTL_FILE.FCLOSE (fileid);
EXCEPTION WHEN OTHERS THEN
UTL_FILE.FCLOSE (fileid);
END;
and you get an empty file.
Change the PUT_LINE to PUT and you get a file with the text PUT does work correctly and you can write very long strings out so this is a total disaster, at least there is a work around.
If you remove the line size parameter from FOPEN then PU_LINE does work and writes the string to the file.
Has anyone else found this or am I doing something wrong
Rob Edgar Received on Sun May 09 1999 - 03:54:27 CDT