Converting OLE Object Data from an Access DB to a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Space

After searching the whole web I hope someone here can help me to find a solution. I need to convert OLE-Object fields from an legacy Access DB back to normal, plain files. I have no problem to extract the "raw" OLE-Object data (= OLE-Header + Filedata) and store it as file (I'm using an OleDbDataReader).

My problem is, that I can't find a solution to get rid of the OLE-Header! Since I have found the statement "Because the definition of OLE object storage is not documented, ..." in the MS KB, I'm a little afraid ..

One other problem ist, that this OLE-Object filed does not only contain only one type of file (e.g. Bitmaps), instead it can be ANY type (e.g. .doc, .xls, .txt, .bmp, .dxf, ...).(So just searching for the header of the specific filetype is not an option.

Hope someone can point me to a solution for this problem. (Which I have found out is a common problem for several other programers on the web, too.

Thanks for any hel

Chri
 
¤ Hi Space!
¤
¤ After searching the whole web I hope someone here can help me to find a solution. I need to convert OLE-Object fields from an legacy Access DB back to normal, plain files. I have no problem to extract the "raw" OLE-Object data (= OLE-Header + Filedata) and store it as file (I'm using an OleDbDataReader).
¤
¤ My problem is, that I can't find a solution to get rid of the OLE-Header! Since I have found the statement "Because the definition of OLE object storage is not documented, ..." in the MS KB, I'm a little afraid ...
¤
¤ One other problem ist, that this OLE-Object filed does not only contain only one type of file (e.g. Bitmaps), instead it can be ANY type (e.g. .doc, .xls, .txt, .bmp, .dxf, ...).(So just searching for the header of the specific filetype is not an option.)
¤
¤ Hope someone can point me to a solution for this problem. (Which I have found out is a common problem for several other programers on the web, too.)

I've actually been looking at this issue where the type of object is a GIF file. So far I've been
unable to determine how Microsoft Photo Editor changes the data when inserting into the database
table.

Your scenario is far worse and likely next to impossible to resolve without using the OLE Control in
Access or Visual Basic 6.0 with OLE automation to save the contents to a file. The WebBrowser
control might be another solution for extracting the data but with either method I see no way to
batch automate the process using data access.

The major stumbling block here is that a host application is responsible for adding the OLE header
information and the host application will be different depending upon the file type. Without use of
that host application it becomes very difficult to remove the OLE header information and save the
data to its native format.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Hi Paul

Thank you for your comment! That's exact the answer I hoped not to hear

I would be interested if there is an official Microsoft statement about this problem. I think I'm not the first person on this world which has this kind of problem. Opening every document and saving it manually is not a solution for more than 10000 entries in Access

So if there is someone from Microsoft listening this thread, maybe it would be possible to get a statement (or even better a solution ;-)

Thanks

Chris
 
Back
Top