Home » SQL & PL/SQL » SQL & PL/SQL » Upload Word document; view contents of Word document (Oracle 10g R2, windows)
Upload Word document; view contents of Word document [message #422730] Fri, 18 September 2009 09:57 Go to next message
73pixieGirl
Messages: 8
Registered: February 2009
Junior Member
I have a requirement to upload a Word document, then display the content of the Word document to the user. I came across the following thread:

www.orafaq.com/forum/t/67922/2/

and am looking for guidance on how to do this. Since it's a Word document it sounds like it needs to be handled different from a .csv file?
Thank you,
T
Re: Upload Word document; view contents of Word document [message #422739 is a reply to message #422730] Fri, 18 September 2009 10:08 Go to previous messageGo to next message
73pixieGirl
Messages: 8
Registered: February 2009
Junior Member
MANY MANY APOLOGIES!

My computer's been acting up and I didn't realize my thread was being posted!!!

Moderator, please delete the other threads!!!

Re: Upload Word document; view contents of Word document [message #422742 is a reply to message #422730] Fri, 18 September 2009 10:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ Word document is binary one, so store it in BLOB. Use DBMS_LOB.LOADBLOBFROMFILE procedure.
2/ Oracle does not display documents, it is your client program

Regards
Michel

[Updated on: Fri, 18 September 2009 10:29]

Report message to a moderator

Re: Upload Word document; view contents of Word document [message #422745 is a reply to message #422742] Fri, 18 September 2009 10:36 Go to previous messageGo to next message
73pixieGirl
Messages: 8
Registered: February 2009
Junior Member
Thank you, Michel!

If I upload the Word document to the database, don't I have to write some PL/SQL code to display the document (by retrieving it from the database)? Sorry if I'm not understanding.
Re: Upload Word document; view contents of Word document [message #422746 is a reply to message #422745] Fri, 18 September 2009 10:39 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can't display from PL/SQL.
You have to use a client program that is able to display a Word document and that could be MS/Word (reading BLOB with VBA) or a browser with a Word plug-in (reading BLOB with PHP or something else).

Regards
Michel
Re: Upload Word document; view contents of Word document [message #423452 is a reply to message #422746] Thu, 24 September 2009 06:05 Go to previous messageGo to next message
73pixieGirl
Messages: 8
Registered: February 2009
Junior Member
Hi Michael,
Sorry for the delayed response...I got pulled into working another task.

I'm afraid I didn't explain the bigger picture...for some reason I thought this was an APEX forum and now know why you think I must be crazy! In one of my APEX applications, I'm using dbms_lob.converttoclob to display the text of a document (.txt file) that was previously uploaded. I need to do the same with the text in a Word document (after the document has been uploaded). I don't mean to open the document in Word, I just need to extract the text from the database. I thought I could use the same function with slight modifications, but it sounds like the Word document needs to be handled differently then a .txt file...is this correct?

Thank you,
T
Re: Upload Word document; view contents of Word document [message #423457 is a reply to message #423452] Thu, 24 September 2009 07:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
but it sounds like the Word document needs to be handled differently then a .txt file...is this correct?

Yes it is binary and not text and must be handled by a plug-in that interprets the binary data as Word document. Most browsers have this plugin just put in the header that the content is a Word document: "Content-type: application/msword".

Regards
Michel

[Updated on: Thu, 24 September 2009 07:34]

Report message to a moderator

Re: Upload Word document; view contents of Word document [message #423459 is a reply to message #423457] Thu, 24 September 2009 07:33 Go to previous message
73pixieGirl
Messages: 8
Registered: February 2009
Junior Member
Thank you for your help!
Previous Topic: calculate on calculated field
Next Topic: UTL_FILE invalid directory problem
Goto Forum:
  


Current Time: Sun Dec 04 22:47:02 CST 2016

Total time taken to generate the page: 0.09467 seconds