FORMS 6i OLE EXTRACTION

From: <wuffik_at_gmail.com>
Date: 12 Jul 2006 00:39:34 -0700
Message-ID: <1152689974.497938.85560_at_m73g2000cwd.googlegroups.com>



Hello,

[Quoted] I have the following problem to solve:

we have some historical data (which all must be safe, indeed) stored in the LONG RAW column in database. It is about 11000 files, stored in the mentioned LONG RAW column using Forms 6i OLE control. Now we want to get rid of the LONG RAW format, which is no longer supported in further versions. So the aim is to extract all those files (Office 97 to Office 2003 documents in Word, Excel, Outlook .msg files and exported Outlook tasks, also PDFs, images, and so on) and copy them to a new structure with BLOB column.
I noticed that those files in LONG RAW cannot be simply converted, because the target files are encapsulated in the OLE TENANT headers. So the way is to extract it, the problem is how to make the process most automatic as possible.
I tried the OLEXTRA library from Leonid K. It is a very good tool - Thanks Leonid! But just in my case, there are some problems with the Excel Files and the big problem is with the Outlook items extraction - .msg files, tasks, etc.
I took a look on the OLE2 package from Oracle. It seems it comes with poor documentation, but I think this can be used somehow. So lets aim to the extraction using the OLE2 package. Imagine the situation - I have 11000 files to get extracted, so I need to do the job automatically.
I have an database block that consists of 2 items, the file in LONG RAW, and its ID. I have an OLE Container which uses the LONG RAW and also an text item representing the ID. My idea is to query it and going to the next record in a loop. In each cycle there will be some steps to be done to extract the file.
My idea is to activate the OLE server, then get the handle using FORMS_OLE.GET_INTERFACE_POINTER which will be pointed to the OLE CONTAINER I mentioned above. Then I will try to add a path and a filename for the file as an argument and INVOKE the object with FILESAVEAS and the argument above.
I performed some tests on a machine with Office 2003 installed (maybe I am silly but I thought that the Office must by compatible backwards) but IT DOES NOTHING - like the Office ignores the FILESAVEAS.

Has anyone the same problem or can tell me if my ideas are wrong and why?

Please, point me to the right direction.

Thank you very much for your help.

Yours Sincerely,

Petr Kuchynka Received on Wed Jul 12 2006 - 09:39:34 CEST

Original text of this message