保存访问报告为PDF /二进制 [英] Save Access Report as PDF/Binary

查看:178
本文介绍了保存访问报告为PDF /二进制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Access 2007年(VBA - ADP)前与SQL Server 2005后端结束。我有我想要的副本作为PDF保存为在SQL Server中的二进制文件的报告。

I am using Access 2007 (VBA - adp) front end with a SQL Server 2005 Backend. I have a report that I want to save a copy as a PDF as a binary file in the SQL Server.

  1. 报告开业
  2. 报告闭合 - 关闭事件触发
  3. 报告保存为PDF格式并上传到SQL Server表作为二进制文件

这是可能的,我将如何实现这一目标?

Is this possible and how would I achieve this?

推荐答案

有,如果是存储在数据库表或不二进制文件是个好主意不同的意见。有人说,它的确定,有的preFER保存文件的文件系统,并只存储在数据库中的文件的位置。

There are different opinions if it's a good idea to store binary files in database tables or not. Some say it's ok, some prefer to save the files in the file system and only store the location of the file in the DB.

我是那些谁说,这是确定的一个 - 我们在我们存储的PDF文件和图像> 440 GB的SQL Server 2005数据库。它运行非常好,我们没有任何与它的问题(例如使用速度...这通常是一个主要的文件系统的人的说法)。

I'm one of those who say it's ok - we have a >440 GB SQL Server 2005 database in which we store PDF files and images. It runs perfectly well and we don't have any problems with it (for example with speed...that's usually one main argument of the "file system" people).

如果您不知道如何保存在数据库中的文件,谷歌的GetChunk和AppendChunk的,你会发现喜欢的这个

If you don't know how to save the files in the database, google "GetChunk" and "AppendChunk" and you will find examples like this one.

关于数据库设计:
这是最好的,如果你让两个表:一是只有一个ID和BLOB字段(其中的PDF文件存储在)和一个与ID和过滤的附加字段
如果你做这样一来,所有的搜索和过滤会发生在小桌子,只有当你知道你要加载的文件的ID,你打的大表只有一个时间和加载该文件。
我们像这样做就像我之前说的 - 该数据库包含近450 GB的文件,我们也没有速度问题,在所有

Concerning database design:
It's best if you make two tables: one only with an ID and the blob field (where the PDF files are stored in) and one with the ID and additional fields for filtering.
If you do it this way, all the searching and filtering will happen on the small table, and only when you know the ID of the file you want to load, you hit the big table exactly one time and load the file.
We do it like this and like I said before - the database contains nearly 450 GB of files, and we have no speed problems at all.

这篇关于保存访问报告为PDF /二进制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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