在 Access 2007 中使用 OLE 对象和附件之间的区别?

发布于 2024-09-07 14:06:01 字数 271 浏览 1 评论 0原文

我正在学习 Access 2007,数据类型列表中有 OLE 对象和附件。

关于附件,文本中有这样的说法:

您可以使用附件来存储 多个文件,甚至不同的 单个字段中的文件类型。这 Access 中新增了附件字段 2007年存储数据文件较多 比使用其他字段更有效 就像 OLE 对象字段一样。

比 OLE 对象更有效吗?

附件数据类型的目的和正确使用是什么?它与 OLE 对象有何关系?

I'm learning Access 2007, and among the list of data types are the OLE Object and the Attachment.

The text has this to say about Attachments:

You can use attachments to store
several files, and even different
types of files, in a single field. The
Attachment field is new for Access
2007 and stores data files more
efficiently than using other fields
like the OLE Object field.

More efficiently than OLE Objects?

What is the purpose and proper use of the Attachment data type? And how is it related to the OLE Object?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

¢蛋碎的人ぎ生 2024-09-14 14:06:01

为什么 OLE 对象是比访问附件数据类型更好的解决方案
OLE 对象存储系统的默认用户界面很笨拙。 Access 2007 中引入的附件数据字段具有改进的用户界面,可以更轻松地处理不同的文件类型。不幸的是,从 Access 2013 开始并在 Access 2016 中继续,Microsoft 开发了一个致命的故障,但他们尚未通过 Windows 更新解决该故障。如果您已将 Microsoft Word 文档保存在 Access 附件字段中,则可以编辑该 Word 文档,但无法将其保存在 Access 中。当您单击“保存”时,系统会提示您将文档保存到文件中。它不会保存到 Access 数据库。其他文件类型将保存到数据库,例如 Excel 电子表格。

由于这个 Microsoft 故障,我被迫为 OLE 对象数据字段开发改进的用户界面。简而言之,它是一个一对多关系表,将文件名和文件保存在 OLE 对象数据字段中。用户界面打开文件资源管理器以添加文件。我使用 ShellExucute 通过 Windows 打开文档,它比 Access 默认用户界面对文件类型具有更大的灵活性。

Access Attachment 数据类型仅限于 Microsoft Access 数据库。 OLE 对象数据类型可以迁移到 SQL Server 数据库,可以使用 SQL Server 查询来搜索所存储文档中的内容。那里有很多力量!只是我的意见。

WHY THE OLE OBJECT IS A BETTER SOLUTION THAN THE ACCESS ATTACHMENT DATA TYPE
The default user interface for the OLE Object storage system is clumsy. The attachment data field introduced in Access 2007 has an improved user interface making it easier to work with different file types. Unfortunately, beginning in Access 2013 and continuing in Access 2016, Microsoft developed a fatal glitch that they have not addressed with a Windows update. If you have saved a Microsoft Word document in an Access Attachment field, you can edit the Word Document, but it cannot be saved in Access. When you click 'Save' you are prompted to save the document to a file. It won't save to the Access database. Other file types will save to the database such as Excel spreadsheets.

Because of this Microsoft glitch, I was forced to develop an improved user interface for the OLE Object data field. In a nutshell, it is a one to many relationship table that saves the file name and file in an OLE Object data field. The user interface opens file explorer to add the file. I use ShellExucute to open the document via Windows which has much more flexibility to file types than the Access default user interface.

The Access Attachment data type is limited to Microsoft Access databases. The OLE Object data type can be migrated to an SQL Server database where the content within the stored documents can be searched with an SQL Server query. A lot of power there! Just my opinion.

開玄 2024-09-14 14:06:01

这不是一个详尽的答案,但我最近尝试使用 OLE 对象 字段来存储要通过报告打印的图像。
简而言之,它的工作并不容易,并且仅限于两种很少使用的图像格式。
使用 Attachment 字段,它就像一个超级按钮,您也可以使用 .PNG 文件。
注 1:附件 在 .MDB 中不可用,因此我必须迁移到 ACCDB。
注2:OLE Object字段可以迁移到SQL Server,Attachment字段不能迁移

Not an exhaustive answer, but I recently tried to use an OLE object field to store images to be printed through a report.
To make the story short, it does not work very easily, and is restricted to 2 little used image formats.
Using an Attachment field, it works like a charm and you can use .PNG files as well.
Note 1: Attachment is NOT available in .MDB so I had to migrate to ACCDB.
Note 2: OLE Object field can be migrated to SQL Server, Attachment field cannot

小糖芽 2024-09-14 14:06:01

这个描述,我想说它是某种本机二进制字段。

OLE 对象字段实际上只是 OLE 对象的容器。它们的体积相当大,而且使用起来很笨拙。

Judging from this description, I would say that it is some sort of native binary field.

OLE Object fields were really just containers for OLE objects. They suffered from considerable bloat, and were clumsy to use.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文