Home » SQL & PL/SQL » SQL & PL/SQL » UTL_FILE error (Oracle 10g. win 2000)
UTL_FILE error [message #297725] Sun, 03 February 2008 00:35 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Guys,

I am working with the UTL_FILE command and trying to make a copy of a .doc file. The file is getting created but when I try to view the new file then I get an error message.

" Word experienced an error trying to open the file
Try these suggestions
*check permission for the document and drive
*Make sure there is sufficient memory and space
*Open the file with Text Recovery converter "

Here is the command

begin utl_file.fcopy('D1','d.doc','D1','dd.doc'); utl_file.fclose_all; end;

I have the DBA rights

Thanks
Re: UTL_FILE error [message #297728 is a reply to message #297725] Sun, 03 February 2008 01:44 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
I am not sure that utl_file.fcopy is suitable for binary files. Especially, since the rest of the procedures and functions in that package (except for some that are explicitly called ...RAW...) are meant for text files..
Re: UTL_FILE error [message #297733 is a reply to message #297725] Sun, 03 February 2008 02:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
What UTL_FILE error?

Regards
Michel
Re: UTL_FILE error [message #297736 is a reply to message #297733] Sun, 03 February 2008 03:06 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
I am not able to open the copy of a doc file (word file) I am creating by the utl_file.copy command.

These is what I see in the error box when I try to open the newly created file

" Word experienced an error trying to open the file
Try these suggestions
*check permission for the document and drive
*Make sure there is sufficient memory and space
*Open the file with Text Recovery converter "

Can you tell me why I see this? What should I do so that I can read the contents of the new file?

Thanks

- Das
Re: UTL_FILE error [message #297738 is a reply to message #297736] Sun, 03 February 2008 03:42 Go to previous message
Michel Cadot
Messages: 68733
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
As Frank said, utl_file.copy is for TEXT file and BINARY one.

Quote:
What should I do so that I can read the contents of the new file?

Don't use UTL_FILE to copy binary files.

Regards
Michel
Previous Topic: Order by result using instr
Next Topic: How to convert data values (merged)
Goto Forum:
  


Current Time: Tue Feb 11 13:37:37 CST 2025