{"id":237,"date":"2017-11-17T07:30:28","date_gmt":"2017-11-17T07:30:28","guid":{"rendered":"http:\/\/www.yohz.com\/blogs\/?p=237"},"modified":"2022-07-07T09:28:24","modified_gmt":"2022-07-07T01:28:24","slug":"exporting-and-extracting-images-and-files-from-microsoft-access-databases","status":"publish","type":"post","link":"https:\/\/www.yohz.com\/blogs\/2017\/11\/17\/exporting-and-extracting-images-and-files-from-microsoft-access-databases\/","title":{"rendered":"Exporting and extracting images and files from Microsoft Access databases"},"content":{"rendered":"<p>Using OLE Object column types, there are 3 ways you can store images and files in a Microsoft Access database, or in a database (e.g. SQL Server) used by a Microsoft Access front-end.<\/p>\n<ul>\n<li>embedding<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">Embedding involves creating the image\/file directly using the associated OLE Server application.\u00a0 For example, if I choose to embed a bitmap image, Access will open Paint for me to create my bitmap image, and save that image into that field.<\/p>\n<p style=\"padding-left: 30px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-239\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_01.png\" alt=\"\" width=\"928\" height=\"565\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_01.png 928w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_01-300x183.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_01-768x468.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_01-150x91.png 150w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/p>\n<p style=\"padding-left: 30px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-240\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_02.png\" alt=\"\" width=\"1063\" height=\"743\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_02.png 1063w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_02-300x210.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_02-768x537.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_02-1024x716.png 1024w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_02-150x105.png 150w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><\/p>\n<ul>\n<li>insert from a file<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">If you already have the image\/file you want to store in your database, you can insert the file into your Access database directly using the <strong>Create from File<\/strong> option.\u00a0 Access then copies the file into the field.<\/p>\n<p style=\"padding-left: 30px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-241\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_03.png\" alt=\"\" width=\"929\" height=\"561\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_03.png 929w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_03-300x181.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_03-768x464.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_03-150x91.png 150w\" sizes=\"(max-width: 929px) 100vw, 929px\" \/><\/p>\n<ul>\n<li>link to a file<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">Similar to the above, but this time, the image\/file is not stored in the database.\u00a0 Access just creates a link to the external file, much like a hyperlink in your browser.<\/p>\n<p style=\"padding-left: 30px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-242\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_04.png\" alt=\"\" width=\"926\" height=\"564\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_04.png 926w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_04-300x183.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_04-768x468.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_04-150x91.png 150w\" sizes=\"(max-width: 926px) 100vw, 926px\" \/><\/p>\n<p>If you store your images\/files using the first 2 methods, then Microsoft Access adds additional data to your image\/file, so that it knows which application to use to open that particular image\/file.\u00a0 This means that if you extracted the data from your database, it will appear different from your original file.<\/p>\n<p>For example, let&#8217;s insert an image into an OLE Object field.\u00a0 The image file is 18.7 Kb in size.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-244\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_06.png\" alt=\"\" width=\"377\" height=\"515\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_06.png 377w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_06-220x300.png 220w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_06-110x150.png 110w\" sizes=\"(max-width: 377px) 100vw, 377px\" \/><\/p>\n<p>Once inserted into the Access database, the size has increased to 19.192 Kb.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-245\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_07.png\" alt=\"\" width=\"800\" height=\"600\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_07.png 800w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_07-300x225.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_07-768x576.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/11\/ole_image_07-150x113.png 150w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>The increase is due to the additional data added by Access.\u00a0 If you now extract the data as is from the database, it cannot be opened by Paint because of the additional data.\u00a0 The PNG data is preceded by OLE headers.<\/p>\n<p>This is a common issue faced by Microsoft Access users &#8211; when they want to extract images and files from OLE Object fields\u00a0to their original format, there isn&#8217;t a way they can do this easily.\u00a0 Every image\/file has been modified by Access.\u00a0 You have to open each image\/file in Access, then save the item to disk manually.<\/p>\n<p>This is the reason we created <a href=\"http:\/\/www.yohz.com\/aole_details.htm\">Access OLE Export<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-589\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/aolescreenshot.png\" alt=\"\" width=\"794\" height=\"701\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/aolescreenshot.png 794w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/aolescreenshot-300x265.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/aolescreenshot-768x678.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/aolescreenshot-624x551.png 624w\" sizes=\"(max-width: 794px) 100vw, 794px\" \/><\/p>\n<p>In just <a href=\"http:\/\/www.yohz.com\/aole_walkthrough.htm\">4 simple steps<\/a>, <a href=\"http:\/\/www.yohz.com\/aole_details.htm\">Access OLE Export<\/a> will extract and export your embedded images and files to disk, stripping out the additional data added by Access.\u00a0 The exported images and files can then be opened &#8216;normally&#8217;, using the appropriate application.<\/p>\n<p>If you require more control over what is exported, <a href=\"https:\/\/www.yohz.com\/siv8_details.htm\">SQL Image Viewer<\/a> is another option.\u00a0 SQL Image Viewer allows you to inspect your data before exporting them, but requires that you be able to write SQL scripts.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-588\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/sivscreenshot.png\" alt=\"\" width=\"910\" height=\"593\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/sivscreenshot.png 910w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/sivscreenshot-300x195.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/sivscreenshot-768x500.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2017\/04\/sivscreenshot-624x407.png 624w\" sizes=\"(max-width: 910px) 100vw, 910px\" \/><\/p>\n<p>There may be situations where both products are unable to identify embedded images\u00a0correctly. \u00a0This may be because the registered OLE Server for that content type is not yet supported. \u00a0In these cases, send us (at\u00a0<a href=\"mailto:support@yohz.com\">support@yohz.com<\/a>) a sample of the embedded data, and we will add support for that OLE server type.<\/p>\n<p>Download a FREE 14-day trial of <a href=\"http:\/\/www.yohz.com\/downloads\/accessoleexport\/AccessOLEExportSetup.zip\">Access OLE Export<\/a> or <a href=\"http:\/\/www.yohz.com\/downloads\/sqlblobviewer\/SQLImageViewerSetup.zip\">SQL Image Viewer<\/a> now to extract embedded objects from your Access databases the easy way.<\/p>\n<p>If instead you need to insert or update OLE-Object data in your databases, have a look at <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a>.\u00a0 Using Excel spreadsheets as the input data, you can easily add and update your embedded or linked OLE-Object data.<\/p>\n<p>You can purchase our products on this\u00a0<a href=\"https:\/\/www.yohz.com\/store.htm\">page<\/a>.<\/p>\n<p>See also:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.yohz.com\/blogs\/2020\/05\/08\/naming-the-exported-files-in-access-ole-export-and-sql-blob-export\/\">naming the exported files using values from other columns<\/a><\/li>\n<li><a href=\"https:\/\/www.yohz.com\/blogs\/2019\/07\/30\/connecting-to-a-microsoft-access-accdb-database\/\">problems connecting to an Access .accdb database<\/a><\/li>\n<li><a href=\"https:\/\/www.yohz.com\/blogs\/2017\/04\/05\/extracting-files-and-data-from-ole-object-fields\/\">extracting files and data from OLE Export fields<\/a><\/li>\n<\/ul>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.yohz.com\/blogs\/2017\/11\/17\/exporting-and-extracting-images-and-files-from-microsoft-access-databases\/\" action=\"like\" colorscheme=\"light\" layout=\"button\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.yohz.com\/blogs\/2017\/11\/17\/exporting-and-extracting-images-and-files-from-microsoft-access-databases\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Using OLE Object column types, there are 3 ways you can store images and files in a Microsoft Access database, or in a database (e.g. SQL Server) used by a Microsoft Access front-end. embedding Embedding involves creating the image\/file directly using the associated OLE Server application.\u00a0 For example, if I choose to embed a bitmap [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17,5,11],"tags":[39,18,20,7],"_links":{"self":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/237"}],"collection":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":10,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":1744,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/237\/revisions\/1744"}],"wp:attachment":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}