OLE Container and binary file retrieval

Author: girish.lokhande@northgate-is.com (Girish Lokhande)

We have stored different binary files (like images, PDFs, documents etc) into a BLOB column of an Oracle table using OLE container. How can we retrieve and save it back to it's original format on a disk without opening it in viewer? 


  1. Thanks for the download option Theo, always better than each one has to wait if his CAM moves. Some general background may be found at: http://en.wikipedia.org/wiki/OLE_Automation And for the internals: http://msdn.microsoft.com/en-us/library/dt80be78.aspx

    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. It seems like there are some documented methods for pulling the file names and contents (and other information too) out of what Microsoft call 'structured storage' files. (Which is what I believe the OLE container creates.) Unfortunately, I don't have the availability at the moment to research a dll we could use to parse this data. 

    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  3. Hi Iain, if you have a good acccount manager, maybe you can get the old documentation from him as part of your supported license.

    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. Hi,   I am working along with Girish on this. I fear that there is no file type information being stored in the database. I did a filedump/raw and tried to identify the file types, but it was also of no use.   The uniface help mentions about the function UOLEINSERTOBJECT. Will it help us in any way? Does anyone have more information on how this function can be used?   Regards Shikhar

    Author: Shikhar Oberoi (oberoishikhar@gmail.com)
  5. I have uploaded a chapter of the old Uniface 7 documentation: http://unifaceinfo.com/downloads/download-info/old-ole-automantion-documentation/ Click the link "pl1.001" to download it.   And I found a document that was already uploaded: http://unifaceinfo.com/downloads/download-info/uniole/ Click the big Download button to download it.   Hope this helps, Theo

    Author: Theo Neeskens (tneeskens@itblockz.nl)
  6. Had me worried there Uli, but it has the same warning in 9.5 and the ole container definitely works in Vista and Windows 7 as well. I think they just haven't updated the docs.  There's no warning about the container being deprecated is there?  I haven't got the U7 docs any more, can we arrange for a dropbox or similar so I can check them out?    Iain

    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  7. Hi Girish, Unless you store some extra information, like the file type, I'm not sure it's all that easy to get the right file-type associated with the BLOB.... What I mean is this: Getting the BLOB content and outputting it is relatively straight forward via the Uniface command "filedump/raw". But, unless you have a 'file-type' flag somewhere, what are you naming the output file?? The file type association in Windows is the 'key' to get the right program to open your file... I hope that makes sense?? Knut

    Author: Knut (knut.dybendahl@gmail.com)
  8. Hi Girish,  This is the problem I have had with the OLE container, it appears that there is no way from proc to manipulate the data contained. It has to be manual via the user interface.  KnutD - The OLE container stores this information alongside the data that make up the file in some form within the same BLOB. I seem to recall previous versions of the Uniface help mentioning some structures with names like UOLEINSERTOBJECT etc which I never managed to get working. We would have liked to load and display files in an independant viewer (which the OLE container appears to be) but cannot manipulate this data properly. (I.e. load it given only a file name, it has to be dragged to the OLE container using the U.I. or similarly, save it in a sensible form from the file for sharing with another ssytem.  It seems the only interface with the OLE container, and the data it represents, is the user interface....    Iain

    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  9. FiresongKt said This is the problem I have had with the OLE container, it appears that there is no way from proc to manipulate the data contained. It has to be manual via the user interface. 

    Hi Iain, you can use the proc to manipulate the data via the OLE. In some very old Uniface Documentations like chapter 11 in PL1 of 7.2.04, you will find some info about (IIRC) OLEMULTI which allows multiple commands to be transmitted in one go. I's similar to the good old DDE which gave you a lot of options to control even browsers. All you have to do is find out which commands they accept.   Caveat: The 9.6.01 docu reads as: This widget is available only for Microsoft Windows 2000, Microsoft Windows NT, and Microsoft Windows XP.

    Author: ulrich-merkel (ulrichmerkel@web.de)