Object Attachment

E

Evan McCutchen

Greetings everyone,

What is the best way to attach, say a PDF document, to a record in
access?

Thanks for your opinions!
Evan M
evan AT radiologyonesource DOT com
 
D

Dirk Goldgar

Evan McCutchen said:
Greetings everyone,

What is the best way to attach, say a PDF document, to a record in
access?

Thanks for your opinions!
Evan M
evan AT radiologyonesource DOT com

It depends on specific requirements of the application or the
environment. By preference, I won't actually store a document or
picture *in* the database; instead, I'll just store the name or full
path to the document file (which may be in a designated folder whose
path is stored in a Profile table), and open it in its registered
application when the user needs to see it. Opening a document file in
its registered application is made rather easy by the
Application.FollowHyperlink method, though one can also call the Windows
ShellExecute API. If it's a picture, I'll use an unbound image control
on a form and set its Picture property to the path to the file whenever
I want to show the picture.

On the other hand, sometimes circumstances require that the database be
competely monolithic, with no depencies on external files. In that case
you can use an OLE object field to store the document, but if you do
this with image files you'll get collossal bloating unless you use some
fancy tricks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top