Link to home
Start Free TrialLog in
Avatar of RCUllrich
RCUllrichFlag for United States of America

asked on

Loading Images into a Database and writing to Disk

I would like to know how to load an image from disk to a table in Access and when needed how to write that image back to the file system.
I want to store images in a table within Access 2010 in case my users delete or rename various graphic images from the file system. These images include the program icon and several images that are used for reporting.
Upon startup, I would like my application to check if these images have been moved, renamed, or deleted and write them back to the disk if needed.
As a side benefit, this type of solution would also allow me to version-control these images instead of using the file system. (I probably would only include the latest images in my distribution to users).
This is for a single-user application that is distributed nationally to individual users via front and back-end executable (.accde) programs.
I know that storing images in a database can use a lot of space, but that is not the issue to be addressed in this question. There are only 5 images that needs to addressed in this manner.
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

<No Points wanted>

    "I would like my application to check if these images have been moved, renamed, or deleted and write them back to the disk if needed."

Why not simply only allow Read permissions to the Image folder? (Denying all other permissions)
In this way, checking the validity of the images should be rare occurrence.

JeffCoachman
Avatar of RCUllrich

ASKER

LSMConsulting: Thanks for the information regarding the new features in Access 2007 and Access 2010. I just concluded a week where I worked 60 hours for a client and have not had a time to test the new "Attachment" feature but will soon and award points. That looks like a great feature - I did not read that section of the various referencing I have used for new features.

Jeff - I use SageKey for creating the installation program and will certainly consider setting the permission for my images folder. It does bring up the issue regarding the permissions my program would have to "write" to that location in the event a user removed one of the images. I will need to add error handling code to the program warn that a report is not available if the user has deleted an image used on that report. Thanks!