Have you ever needed to update the linked file locations in an OLE Object-type field in your database? Access OLE Import can do all that for you and more.
Let’s say you have a table with an OLE Object column that contains links to a file. In SQL Image Viewer, you may see the following:
So all the images are currently linked to files located in the F:\Customer files\ folder. What if the files are no longer there, for e.g. when you share your database with other users? Your users will not be able to access the images because they may not have that folder available to store the images.
Access OLE Import can help you update the details in the OLE Object field. To do that, you just need to provide the key field value of the records to update, and their corresponding file location, in an Excel file. So for e.g. let’s say all our images are now stored in the G:\Employee photos\ folder. Our Excel spreadsheet will simply contain the following:
The ID column refers to the ID field in our table. The keynumber definition tells Access OLE Import that this is an integer key value.
The photo column refers to the photo field in our table, and filecontent tells Access OLE Import we want to work with the contents of the files listed in this column.
We then tell Access OLE Import that we want to create links to the files.
And that’s all there is to it. Access OLE Import will update the relevant records, and the links to the images are updated accordingly.
If you prefer to embed the image in the table, then select the embedded option instead.
Now Access OLE Import will embed the images directly in the table.
Learn more about Access OLE Import here, or download a 14-day trial now. Access OLE Import can help you update batches of records easily, instead of having to update each record individually via your application.
See here for a more detailed example on how to update embedded OLE Object data.