将PDF文件另存为数据库中的OLE对象 [英] Saving PDF file as an OLE object in a database

查看:84
本文介绍了将PDF文件另存为数据库中的OLE对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图解决这个问题。


目前我有一个代码可以将默认打印机更改为PDF打印机,然后将其命名为在我的表单中的字段,并将报告的名称更改为该字段然后打印,我得到PDF文件,所以我可以通过电子邮件发送但我想​​将该PDF文件保存为我的一个表格上的Ole对象以供日后使用但我不知道如何解决这个问题。


提前感谢您的帮助。

I have been trying to figure this out for some time now.

Currently i have a code that changes the default printer to a PDF printer, it then takes the name of a field in my form and changes the name of a report to that field then prints, i get the PDF file so i can email out BUT i want to save that PDF file as an Ole object on one of my tabels for later referance but i dont know how to go about this.

thanks in advance for your help.

推荐答案

我在几篇文章中已经提到了这一点。最近我想你会告诉你,如果你将OLE对象存储在你的表中的一个字段中,你可能会遇到严重的麻烦。 MS Access具有2个gig限制,因此如果采用这种方法,请记住这一点,OLE对象往往会以一种主要方式增加数据库的大小。我找到了以下帖子,这个帖子有一个链接,可以引导你朝着你想要的方向发展。

http://www.thescripts.com/forum/thread205446.html
I have mentioned this in several articles recently and thought I would let you know that if you are storing OLE objects in a field in your table you could be asking for serious trouble. MS Access has a 2 gig limit so if you take this approach then keep this in mind, OLE objects tend to increase the size of your DB in a major way. I did find the following thread this thread has a link which should guide you in the direction you want.

http://www.thescripts.com/forum/thread205446.html


我将如何保存这些PDF?文件在服务器上的单独文件夹中,然后在我的表中的字段与文件夹内的特定文件之间创建链接?
how would i go about saving these "PDF" files in a seperate folder on the server then creating a link between a field in my table to that particular file inside the folder?


您可能存储多少个pdf?我没有看到太多的问题,只要它不是太多。但我不存储为ole对象,而是将它们存储为blob。

我的一个应用程序在达到某些阈值时会使用一些wave文件。我存储它的方式是在Access中作为 blobs 的表格。然后我使用代码读取并保存到用户的PC上


如果是卸载,那么你应该按照建议的那样,存储文件的路径。

你在哪里存储这些pdf'?

你需要做的是每次你创建一个pdf,把这个名字存储在某个表中

例如

tblPDFs

ID(自动编号)

名称(pdf名称)


假设pdf这些都在一个目录中,如果没有,那么你需要存储路径


现在在你的另一个表中,你可以存储ID。这是pdf的链接
How many pdf''s are you likely to store. I dont see a problem too much so as long as its not too many. But I dont store as ole objects, instead I store them as blobs.
One app of mine has a few wave files used when certain thresholds are hit. The way I store this is in a table in Access as blobs. I then use code to read and save onto the user''s PC

If shedloads then u should as already suggested, store a path to the file.

Where are you storing these pdf''s?
What u need to do is each time u create a pdf, store that name in some table
eg
tblPDFs
ID (autonumber)
Name (name of pdf)

assume pdf''s are all in one directory, if not then u need to store the path as well

now in your other table, u can store the ID. That is the link to the pdf


这篇关于将PDF文件另存为数据库中的OLE对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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