Monthly Archives: October 2021

Updating embedded data in OLE Object fields

Do you need to update a batch of OLE Object fields, and you don’t want to have to update them individually using your application?  Access OLE Import can help you with such tasks.

We had a user that needed to update a few thousand rows in an Access table, specifically an OLE Object field that stores a zip archive.  He already had all the zip files ready, but did not want to have to update each record individually.

So in SQL Image Viewer, the existing records show up as zip archives embedded in OLE Object packages:

The user already has the new zip files he wants to update the records with.  Using Access OLE Import, he just needs to prepare an upload definition file providing the key field value (ID in this case) and the OLE Object column to update the contents for (the quotations field).

In Access OLE Import, we enter the table to update together with this data file.

And that’s it.  Access OLE Import will update the OLE Object fields with the new zip files accordingly.

Note that you can also update any of the other text or numeric fields in your tables using Access OLE Import.  For e.g. if the user had wanted to update the address field, he only needed to enter the new values in the data file e.g.

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 on how you can update linked file locations using Access OLE Import.

Updating linked file locations in OLE Object fields

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.