Massimo Scola
asked on
External images are saved in MsSysResources table - How to avoid it?
I am developing an employee database which displays the employee's Picture when his/her record is selected.
The Picture is displayed using the following procedure:
The Problem is that the image is added to the hidden MsSysResources table.
With almost 300 Pictures, the database has grown from 5 MB to 200 MB in size.
Is there a way to not store the images in this table?
Thanks for your feedback
Massimo
The Picture is displayed using the following procedure:
Private Sub Form_Current()
On Error GoTo ErrorPicture
imgPicture.Picture = CurrentProject.Path & "\fotos\" & emp_Picture
On Error GoTo 0
Exit Sub
ErrorPicture:
On Error Resume Next
imgPicture.Picture = CurrentProject.Path & "\fotos\_Person.png"
End Sub
The Problem is that the image is added to the hidden MsSysResources table.
With almost 300 Pictures, the database has grown from 5 MB to 200 MB in size.
Is there a way to not store the images in this table?
Thanks for your feedback
Massimo
See Adding Attachments to an Access Database for everything you need to know on the subject.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can use the simple and proven method as described in my article:
Show pictures directly from URLs in Access forms and reports
A full demo is included.
Show pictures directly from URLs in Access forms and reports
A full demo is included.
Just to follow-up regarding switching the Picture Type to Embedded, although not stored in the MsSysResources table, it is still being embedded within the database, so you still get bloating and for systems with lots of such images it remains a problem (you can fast approach the 2GB file size limit). Storing the paths/filenames as text remains the proper solution for such cases. Personally, I only embedded things like button images and the likes (GUI components that I know are 100% static), but all content relating to records are simply stored as plain text.
Yes, you would want to link images so they don't get stored anywhere in the DB.
Jim.
Jim.
ASKER
That worked - thanks a lot!