They say its better not to put images to database. Maybe its rumors, maybe not. Anyway, large amount of images makes DB fat and thus stresses database application. Its not easy to handle fat beings, huh.
Thanks to AccessImagine, all you need to specify is where to keep images – and it will do all the job by itself. If you try to code external storage by your own, you will have hard times. Not worth getting in trouble with.
There is StoragePath property accessible at the design-time. After specifying it AccessImagine will store images there while image filenames will be written to the bound database field.
Here is an example of the StoragePath property values:
- “\\Avenger\Incoming\Pics” – local network path, useful for centralized storage
- “Pics” – subfolder in folder, where your database file is stored
- “.” – keep images in the same folder with database file
AccessImagine tries to preserve original name of the picture – or gives some common name (like “image”, “scan”, “paste”) if it originated from the other source. Surely, component adds some numbers for duplicate filenames.
Notice: if a file is no longer needed (i. e. user put a new photo instead the old one) it will be deleted from the storage.