有关 Access 2003 和 OLE 对象数据类型的性能问题

发布于 2024-07-05 10:10:35 字数 210 浏览 8 评论 0原文

在 MS Access 2003 中(我知道,我知道),我使用 OLE 对象数据类型来保存一些标记为可序列化的对象的状态(只需使用 IO.BinaryFormatter 序列化为 MemoryStream,然后保存该对象)作为字节数组发送到数据库)。 这与 varbinary 或 blob 非常相似吗? 是否有任何人都知道的阴影中隐现的陷阱? 有什么表演建议或战争故事吗? 我会从任何建议中受益。

In MS Access 2003 (I know, I know), I'm using the OLE Object data type to persist the sate of some objects that are marked as serializable (just using a IO.BinaryFormatter to serialize to a MemoryStream, and then saving that to the db as a Byte array). Does this work pretty much like a varbinary, or a blob? Are there any gotchas looming in the shadows that anyone knows about? Any performance advise or war stories? I'd profit from any advice.

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

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

发布评论

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

评论(2

冷夜 2024-07-12 10:10:35

在访问中,我从未弄清楚如何正确使用 OLE 对象数据类型而不会出现真正的性能问题(以及结构问题 - 大量压缩和修复作业)。 我一直采取的解决方案路径(请注意,我已经几年没有愤怒地使用过 Access)就是将博客存储到磁盘上的某个位置并存储文件在数据表中的位置。

In access I never figured out how to properly use the OLE object data type without real performance problems (and structural too -- lots of compact and repair jobs). The solution path I've always taken (mind you I haven't used Access in anger now for years) is to just store the blogs onto disk somewhere and store the file location in the data table.

若水微香 2024-07-12 10:10:35

我无法回答您的具体问题,但您可能想查看 Access 帮助中的 GetChunk 和 AppendChunk 方法,因为这些是用于在二进制字段中写入和操作数据的方法。

I can't answer your specific question, but you might want to look at the GetChunk and AppendChunk methods in Access help, since those are the methods used for writing and manipulating data in binary fields.

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