Can we fetch attachemnt from one table to another through query (1 Viewer)

sbaud2003

Member
Local time
Today, 09:35
Joined
Apr 5, 2020
Messages
184
I wan to fetch the Pic of an attcahment to another table, is it possible
 
Yes, but not a good idea. True, Access does support attachments in fields in tables. In practice it turns out that storing pictures and other binary files internally bloats Access accdbs to the extent that it can make them practically unusable. Duplicating the picture in two tables would cut in half the time it would take to render the bloated accdb inoperable.

In addition, normalization requires that each data point is stored once, in one table, not duplicated in two tables. So, if you need to display the attachment in more than one place, the method for doing that is to join tables in a query.

But first, I strongly recommend you redesign the original table to move all pictures into a network folder and only store the path to those images in a field in the table. Search here for examples of doing so.
 
Having dealt with a DB that uses pictures, your best bet is to store them in a logical subdirectory under the directory you store you database in. This reduces bloat in your DB, reduces the chances it gets corrupted, and runs faster than trying to store it internally.

Please note, for images, make sure you store them in PNG format. If you don't, you have some that just .... don't appear when you try to display them in Access.

Bonus, this means you can then edit the image using normal tools.

If you absolutely MUST have it in your database for reasons beyond your control, use a query to return the image rather than having a copy in another table.
 
Yes, but not a good idea. True, Access does support attachments in fields in tables. In practice it turns out that storing pictures and other binary files internally bloats Access accdbs to the extent that it can make them practically unusable. Duplicating the picture in two tables would cut in half the time it would take to render the bloated accdb inoperable.

In addition, normalization requires that each data point is stored once, in one table, not duplicated in two tables. So, if you need to display the attachment in more than one place, the method for doing that is to join tables in a query.

But first, I strongly recommend you redesign the original table to move all pictures into a network folder and only store the path to those images in a field in the table. Search here for examples of doing so.
THANKS
 

Users who are viewing this thread

Back
Top Bottom