Categories

Duncan Mills

Syndicate this blog

Serialized OLE Documents in the Database

It's a common misconception with Forms applications that when you save an OLE object, (for instance a Word Document) into a Blob column, through an OLE container item in a Form, it gets saved with some sort of "Wrapper" around it. This is not actually the case, although if you do a binary comparison of the document on disk and the document as stored in the database it does look like some kind of header information has been added. What is actually happening when you commit/save an OLE document like this, is that the OLE Container (Forms in this case) asks the OLE Server (Word) to serialize the containee document, and it is this serialized byte array that is persisted to the database. So it's up to the document server (Word) how this serialization happens, rather than Forms making some sort of change to the document.
Anyway, in relation to this, we have the problem of systems which currently store such serialized documents and which need to be upgraded to web deployed versions of Forms where the OLE container is not available. We have a database table full of these documents and somehow they need to be "decoded" back to the clean doc format that you could for instance use WebUtil to handle in a web deployed scenario. In the longer term a utility will hopefully be supplied with Forms that will handle this job for you. However right now there is already an approach you can take which uses Forms itself to do the extraction. This was provided by a Forms user Leonid Kudryavtsev and publicized some time ago on the Oracle Technology Network.
The discussion of this issue is on the OTN Forms Forum
* Update *
This appears to be the updated thread on OTN:
The forum thread has moved to:
http://forums.oracle.com/forums/thread.jspa?forumID=82&threadID=198798

Comments:

Comment from: David Gillespie [Visitor]
We have converted from 6i to 10g and have thousands of files stored in OLE containers and would like to be able to download through the 10g forms and open the file on the client. Works Ok for new files saved into a blob via webutil but older files stored in OLE containers do not. Is there a method to convert these files or a utility someone knows of?
Permalink 11/05/07 @ 18:45
Comment from: Jeff Brewer [Visitor]
Same problem as David with PDF and MS Word files. I was going to attempt unwrapping them until I read Duncan's blog and learned these are serialized documents. I checked the forum at OTN and they reference an extraction tool but it doesn't seem to be available. Is there a way to use VBA in MS Word and/or Acrobat to open this serialized data and then save file as Word/PDF file?
Permalink 14/06/07 @ 20:03
Comment from: Regis Levesque [Visitor]
As Jeff mentionned, where can we find this ole extract tool on the web?

Also, Oracle was supposed to work on an Ole extractor to help their customer
Do they finally provide this tool?

Thank you
Permalink 23/10/08 @ 15:04

Comments are closed for this post.