If you use OLE Object fields in your Access or SQL Server databases to store images, you know it’s convenient to just be able to click on the item and have Windows open the image using the registered viewer on your computer. However, it becomes difficult to extract the images because Access adds additional OLE data to the stored images, thus changing their original form.
Take a Windows bitmap image,
and store it in an OLE Object field in a SQL Server linked-table.
The original file was 2,002,182 bytes in size, but has increased to 2,002,298 bytes when stored in the OLE Object field. Access has added 116 bytes to the image.
and that the data stored in the field is different from the original bitmap file.
How can we then export this image? One way is to open the table using Access, then double click on the data, and Access should then open the stored image in the registered OLE server for that image type, in our example Microsoft Paint.
However, this is a tedious process if we need to export a lot of images. SQL Blob Viewer and Access OLE Export are two applications that we developed to easily export images and other data stored in OLE Object fields. Exporting the items using SQL Blob Viewer or Access OLE Export is just a matter of writing the appropriate SQL query or selecting the right table. SQL Blob Viewer is for users who are comfortable writing queries and want more control over how images are exported, while Access OLE Export is for users who just want to be able to select a table or write a simple query and export the images as is.
SQL Blob Viewer also displays a preview of the image when we query the table:
There may be situations where both products are unable to identify embedded images correctly. This may be because the registered OLE Server for that content type is not yet supported. In these cases, send us (at firstname.lastname@example.org) a sample of the embedded data, and we will add support for that OLE server type.