help guys, i need to know how to add images and video files (if its possible or just its file path) on access database to be retrieve in vb6 with every images and videos filename included (can be displayed on a separate label for example)

Dani AI

Generated

A concise, practical summary and next steps based on the thread: OP asked about storing images/videos in Access for VB6. The replies split between embedding binaries () and storing paths/filenames (, ). Both approaches are valid; choice depends on file count/size, distribution, backup needs and long‑term growth.

For most apps with many or large media files the recommended pattern is to keep media on disk and store metadata in Access: save a relative path/filename plus MIME/type, size, hash and a thumbnail path. Use unique filenames (GUIDs or a folder-per-record) to avoid collisions. In VB6, list thumbnails quickly (thumbnail folder), and load the full image with LoadPicture or open videos with ShellExecute (quick) or embed Windows Media Player ActiveX for in‑app playback. Always handle missing files and network latency gracefully, and version/backup the media folder separately from the database.

If embedding is required (single-file deployment or strict file-control), prefer Access’s Attachment data type (ACCDB) rather than legacy OLE Object fields — attachments avoid many OLE‑wrapper issues and Access compresses some image types; note individual attachment limits and overall DB limits. Access database files (.accdb/.mdb) are limited to 2 GB total, and Attachment handling and extraction from recordsets is supported via ADO Stream or GetChunk/AppendChunk methods so the blob can be saved to disk for display. See Microsoft docs on Access limits and attachment/stream methods for details: Access specifications (2 GB limit), Attachment object / ACCDB notes, and ADO Stream / SaveToFile and GetChunk examples / (https://learn.microsoft.com/en-us/office/client-developer/access/desktop-database-reference/appendchunk-and-getchunk-methods-example-vb).

Troubleshooting notes: OLE Object fields often include a host‑specific wrapper — extraction then requires stripping to the real file header (JPEG/PNG/BMP signatures). For reliability and scalability prefer external files + DB metadata; use embedding only for small sets or when distribution simplicity outweighs the size/performance tradeoffs.

Recommended Answers

All 5 Replies

Save the binary of image on accesss.

i think that storing images to the database would not be the right way because it will require more size for your DB and it will finally result in slow processing.

so you should store only filename not an image file and for this , make proper use of function named FileCopy and store the name of file to the database.i suggest that modify the file name also otherwise duplicasy problem may arise.

have a look at the following FileCopy statement

FileCopy CommonDialog1.Filename, App.Path & "\" & CommonDialog1.FileTitle

hope this helps you

I think this can help you.
Click Here

I have found it best just to store the path & file name of the image, video etc in the access database. In my executable once the relevant path is selected, I then use shellexecute to boot the file, and as long as Windows has an association with the file type, it will display it appropriately. I have done this with all sorts of files, images, videos, PDF, Excel, Word, basically anything that Windows has an association with.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.