Hello,
At the moment I have a Microsoft Access database with an OLE Object holding a picture.
I have tried to find code to retrieve the image saved in the OLE Object but to no success.
If there is anyone that can help me with this?
Regards
Mitchell
解决方案
There is a quite a bit of difference between using OLE in java and getting an OLE object from a MS Access database via Java.
Normally MS Access is accessed via the appropriate ODBC driver (which has nothing to do with java.) And ODBC does not support OLE objects directly. At least not as far as I recall nor that I can find.
So what one must do is exact the OLE in binary and then exact information from that by manipulating it. In other words the binary extracted contains a image and OTHER information. That other information be removed before the binary data will be an actual image.
Following provides some information.
http://stackoverflow.com/questions/1029340/extract-ole-object-pdf-from-access-db[^]
BEFORE attempting to manipulate the image you MUST test the following.
1. Write your code to extract the image from the object.
2. Write the binary data to a file.
3. Use an appropriate external application to load the file and insure the format is correct.
4. Repeat the above steps for all known variations