Home » SQL & PL/SQL » SQL & PL/SQL » Updating a BLOB object via PLSQL (Oracle 10g, 10.2.0.3.0, SunOS Unix)
Updating a BLOB object via PLSQL [message #403100] Wed, 13 May 2009 14:33 Go to next message
sanrajar
Messages: 13
Registered: April 2005
Junior Member
Hello,

I would like to know if I can achieve the following requirement using pl/sql:

Assume, I have uploaded a word document into a database table (which has a blob column) using DBMS_LOB api

Now, as per a certain client request, is there a way through which I can modify the word document in the database table such that,
a. There should be a company logo in the top-left corner (or)
b. Bold the text in the first and third lines of the word document

Client wishes to achieve this change programmatically owing to huge volume of blob objects available in the database.

Please let me know your thoughts, if Oracle pl/sql is a suitable tool to solve this requirement.

Thanks,
Santhosh
Re: Updating a BLOB object via PLSQL [message #403101 is a reply to message #403100] Wed, 13 May 2009 14:40 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
This problem really has little to do with Oracle or PL/SQL.

Start by assuming you have Word file on disk.
How do you modify the word document file such that,
a. There should be a company logo in the top-left corner (or)
b. Bold the text in the first and third lines of the word document

Once you can post steps as to how to do as stated above, it should be straight forward to implement.
I suspect that Java will be a better choice than PL/SQL.
Re: Updating a BLOB object via PLSQL [message #403104 is a reply to message #403101] Wed, 13 May 2009 15:01 Go to previous messageGo to next message
sanrajar
Messages: 13
Registered: April 2005
Junior Member

Hello,

I am planning to perform the indicated operation using Java.

But I would appreciate if anyone has performed similar operation using PL/SQL (since I am comfortable with PL/SQL).

Thanks,
Santhosh
Re: Updating a BLOB object via PLSQL [message #403121 is a reply to message #403104] Wed, 13 May 2009 16:24 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Changing a Word document with PL/SQL would be like mixing a Martini with a bulldozer.

Theoretically possible, but I doubt anybody has done something similar so far.

You need some language which can talk to Word using OLE automation.

The Windows Scripting Host might be an option, once you have the BLOB outside the Database.

Any language that can send OLE automation commands should work.

Re: Updating a BLOB object via PLSQL [message #403128 is a reply to message #403100] Wed, 13 May 2009 20:10 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
hi,
if i am right mr.andi_raj one of our forum member has done your requirement using clob. Provident Fund Trust resoultions has been entered as word document and made some corrections too using the update only. I will try to get the solution from him. Meanwhile, if solution reached, pl pm to me so that i will not try to contact him
yours
dr.s.raghunathan
Re: Updating a BLOB object via PLSQL [message #403171 is a reply to message #403128] Thu, 14 May 2009 00:50 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
dr.s.raghunathan wrote on Thu, 14 May 2009 03:10
hi,
if i am right mr.andi_raj one of our forum member has done your requirement using clob. Provident Fund Trust resoultions has been entered as word document and made some corrections too using the update only. I will try to get the solution from him. Meanwhile, if solution reached, pl pm to me so that i will not try to contact him
yours
dr.s.raghunathan

You can't store word documents in clobs, since they contain binary data.
Previous Topic: How to find max value of a variable. (merged)
Next Topic: string inside the dbms_xmlgen.getxml function
Goto Forum:
  


Current Time: Sun Dec 04 14:59:44 CST 2016

Total time taken to generate the page: 0.10248 seconds