Java和OLE对象 [英] Java and OLE Objects

查看:548
本文介绍了Java和OLE对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

目前,我有一个带有图片的OLE对象的Microsoft Access数据库.
我试图找到代码来检索保存在OLE对象中的图像,但没有成功.

如果有人可以帮助我吗?

问候
Mitchell

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

推荐答案

在Java中使用OLE和通过Java从MS Access数据库中获取OLE对象之间有很大的区别.

通常,通过适当的ODBC驱动程序(与Java无关)访问MSAccess.ODBC不直接支持OLE对象.至少在我记得或找不到的地方.

因此,必须做的是精确地将OLE转换为二进制,然后再通过对其进行操作来获取准确的信息.换句话说,提取的二进制文件包含图像和其他信息.在二进制数据成为实际图像之前,其他信息将被删除.

以下提供了一些信息.

http://stackoverflow.com/questions/1029340/extract-ole-object- pdf-from-access-db [ ^ ]

在尝试操作图像之前,必须先测试以下内容.
1.编写代码以从对象中提取图像.
2.将二进制数据写入文件.
3.使用适当的外部应用程序加载文件,并确保格式正确.
4.对所有已知的变体重复以上步骤
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


这篇关于Java和OLE对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆