Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I attach .pdf files to an Access record? 1

Status
Not open for further replies.

MacroScope

Programmer
Jul 17, 2010
286
US
I would like to attach .pdf files to an Access record. They could consist of incoming faxes, copies of checks, or anything else that I'd want to associate with a given record. I'm unsure of what the best method would be, and whether the files themselves need be stored within Access or whether they can be stored externally to Access. There might be one or several .pdf's for any given record.

Ideally I think I'd prefer having them outside, but I'd like to hear pros and cons to both concepts.

What are data and size limits to an Access database? I'm currently using 2007.

As always, all help will be appreciated.
 
Thank you. This is exactly what I was looking for. It lays out almost everything I need to know.

I'd like to ask a couple of questions, though. It says you can attach a maximum of 2 GB of attachment data, the maximum size of an Access DB. Obviously if it's part of the same DB, you have to have room for other stored data, so 2 GB of attachments isn't possible.

Or is it?

Can the attachments be held in a completely separate database and linked? If it can be, can the DB be set up originally to have attachments held in the same DB, and then split it later, or does it need to be designed from day one as two separate DB's?

I didn't see that discussed there.

I'd also like to ask about the following, quoted directly from the page.

Supported image file formats

Office Access 2007 supports the following graphic file formats natively, meaning the attachment control renders them without the need for additional software.

BMP (Windows Bitmap)

RLE (Run Length Encoded Bitmap)

DIB (Device Independent Bitmap)

GIF (Graphics Interchange Format)

JPEG, JPG, JPE (Joint Photographic Experts Group)

EXIF (Exchangeable File Format)

PNG (Portable Network Graphics)

TIFF, TIF (Tagged Image File Format)

ICON, ICO (Icon)

WMF (Windows Metafile)
EMF (Enhanced Metafile)
Supported formats for documents and other files

As a rule, you can attach any file that was created with one of the 2007 Microsoft Office system programs. You can also attach log files (.log), text files (.text, .txt), and compressed .zip files.


I see no mention of .pdf files there. Am I to assume that they can not be attached?

Can the attachment field be created in an SQL table? What is the code for it there?

I appreciate your help and input, BTW.
 
Although not mentioned in that article, I am pretty certain .pdf is supported. Should be an easy test.
You can put all the attachments in one .accdb and link that to your front end. But I think you are correct in that the amount of attachments is closer to (2G - size of tables and other objects). So something less than 2Gs.
If the 2Gig limit is a problem then you make consider not storing the attachments and instead only storing a reference location to the document.
Do not think that SQL Server supports an attachment type field. I think it would be a BLOB.
 
Thanks for the input.

I don't anticipate the storage size of attachments will be a problem, but I was just asking for reference. I don't expect that I'll be using SQL for a while yet, so perhaps by the time I need it it will be integrated there as well.

I'm hoping that .pdf is supported, and in reading what I pasted more carefully it says that

Office Access 2007 supports the following graphic file formats natively, meaning the attachment control renders them without the need for additional software.

It's talking about rendering, not actually attaching. My bad!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top