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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User wants to store PDF doc in the database....HOW?

Status
Not open for further replies.

colezpapa

Programmer
Feb 26, 2007
86
US
My users of one of the access databases I support would like to store 1 pdf/word document for each account record in the database.
First...how would I even go about doing this.
 
Unless you are using Access 2007, this is probably not a good idea. The usual way is to store a link to the document, rather than the document itself.
 
yep, you are correct. Thats what I am going to do as I have a routine in another system that I can use.
 
Well, this has come back. I built a way to link a document to the database. However, they (users) want to store the document in the database because of security concerns.
They are uncomfortable with storing the docs in a folder where it can be seen, They tell me its only 1 doc per account record....in this case under 100 documents.
How would I go about storing a document in a table....
 
I think you can use an OLE Object type field but as others have said it's not a good idea. How big are the PDF files?

Ed Metcalfe.

Please do not feed the trolls.....
 
Colezpapa

For Access 2000 - 2003 inclusive the maximum file size of an MDB or MDE file is 2Gb, therefore if your PDFs are quite large, you may want to have them in a separate database to the main one (store the primary key value of the main table and the file itself). Alternatively upsize to SQL Server/MSDE/SQL Express and store it in there.

John
 
A hundred documents will lead to a good deal of bloating in versions earlier than 2007. You can store objects such as PDFs in an OLE Object field. You can also store documents as BLOBs, which means less bloat but a little more trouble:
 
It would not suprise me if the number of .pdfs and/or their size will grow over time.

Have you thought about creating a folder that has limited access. (Use Windows or UNIX security to set access permissions) and then create links to that folder.

Alternately, if you're using Sharepoint, you might place the files on a secure area in your intranet.

(If you're not using Sharepoint yet, you may have access to it for free.)
 
Thanks for the info....
I saved a document to the table, creating an OLE object field. How can I automate opening up the document....
I can see it by right clicking -->then clicking on document open....

Is there a way to do that in code?
 
I'm having trouble with this. Does anyone know the magic trick. I am using an unbound recordset for the form.
I have a button with this code behind it...
But how do I bind the OLE field in the table to the OLEBound391 control on the form?

Me.OLEBound391.Visible = True
Me.OLEBound391.Verb = acOLEVerbOpen
Me.OLEBound391.Verb = acOLEVerbShow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top