{"id":1499,"date":"2021-10-05T14:37:40","date_gmt":"2021-10-05T06:37:40","guid":{"rendered":"https:\/\/www.yohz.com\/blogs\/?p=1499"},"modified":"2021-10-05T16:46:01","modified_gmt":"2021-10-05T08:46:01","slug":"updating-linked-file-locations-in-an-ole-object-field","status":"publish","type":"post","link":"https:\/\/www.yohz.com\/blogs\/2021\/10\/05\/updating-linked-file-locations-in-an-ole-object-field\/","title":{"rendered":"Updating linked file locations in OLE Object fields"},"content":{"rendered":"<p>Have you ever needed to update the linked file locations in an OLE Object-type field in your database?\u00a0 <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> can do all that for you and more.<\/p>\n<p>Let&#8217;s say you have a table with an OLE Object column that contains links to a file.\u00a0 In <a href=\"https:\/\/www.yohz.com\/siv8_details.htm\">SQL Image Viewer<\/a>, you may see the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1501\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update02.png\" alt=\"\" width=\"843\" height=\"533\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update02.png 843w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update02-300x190.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update02-768x486.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update02-624x395.png 624w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/p>\n<p>So all the images are currently linked to files located in the <strong>F:\\Customer files\\<\/strong> folder.\u00a0 What if the files are no longer there, for e.g. when you share your database with other users?\u00a0 Your users will not be able to access the images because they may not have that folder available to store the images.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1502\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update03.png\" alt=\"\" width=\"751\" height=\"596\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update03.png 751w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update03-300x238.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update03-624x495.png 624w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/p>\n<p><a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> can help you update the details in the OLE Object field.\u00a0 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.\u00a0 So for e.g. let&#8217;s say all our images are now stored in the <strong>G:\\Employee photos\\<\/strong> folder.\u00a0 Our Excel spreadsheet will simply contain the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1508\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update08.png\" alt=\"\" width=\"506\" height=\"212\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update08.png 506w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update08-300x126.png 300w\" sizes=\"(max-width: 506px) 100vw, 506px\" \/><\/p>\n<p>The <strong>ID<\/strong> column refers to the <strong>ID<\/strong> field in our table.\u00a0 The <strong>keynumber<\/strong> definition tells <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> that this is an integer key value.<\/p>\n<p>The <strong>photo<\/strong> column refers to the <strong>photo<\/strong> field in our table, and <strong>filecontent<\/strong> tells <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> we want to work with the contents of the files listed in this column.<\/p>\n<p>We then tell <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> that we want to create links to the files.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1505\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update06.png\" alt=\"\" width=\"755\" height=\"489\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update06.png 755w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update06-300x194.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update06-624x404.png 624w\" sizes=\"(max-width: 755px) 100vw, 755px\" \/><\/p>\n<p>And that&#8217;s all there is to it.\u00a0 <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> will update the relevant records, and the links to the images are updated accordingly.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1507\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update07.png\" alt=\"\" width=\"852\" height=\"597\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update07.png 852w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update07-300x210.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update07-768x538.png 768w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update07-624x437.png 624w\" sizes=\"(max-width: 852px) 100vw, 852px\" \/><\/p>\n<p>If you prefer to embed the image in the table, then select the <strong>embedded<\/strong> option instead.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1509\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update10.png\" alt=\"\" width=\"755\" height=\"503\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update10.png 755w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update10-300x200.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update10-624x416.png 624w\" sizes=\"(max-width: 755px) 100vw, 755px\" \/><\/p>\n<p>Now <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> will embed the images directly in the table.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1510\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update09.png\" alt=\"\" width=\"601\" height=\"540\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update09.png 601w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/10\/aoi_update09-300x270.png 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>Learn more about Access OLE Import <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">here<\/a>, or <a href=\"https:\/\/www.yohz.com\/downloads\/accessoleimport\/AccessOLEImportSetup.zip\">download<\/a> a 14-day trial now.\u00a0 <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> can help you update batches of records easily, instead of having to update each record individually via your application.<\/p>\n<p>See <a href=\"https:\/\/www.yohz.com\/blogs\/2021\/10\/05\/updating-embedded-data-in-ole-object-fields\/\">here<\/a> for a more detailed example on how to update embedded OLE Object data.<\/p>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.yohz.com\/blogs\/2021\/10\/05\/updating-linked-file-locations-in-an-ole-object-field\/\" action=\"like\" colorscheme=\"light\" layout=\"button\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.yohz.com\/blogs\/2021\/10\/05\/updating-linked-file-locations-in-an-ole-object-field\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Have you ever needed to update the linked file locations in an OLE Object-type field in your database?\u00a0 Access OLE Import can do all that for you and more. Let&#8217;s say you have a table with an OLE Object column that contains links to a file.\u00a0 In SQL Image Viewer, you may see the following: [&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":[139],"tags":[140],"_links":{"self":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/1499"}],"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=1499"}],"version-history":[{"count":4,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/1499\/revisions"}],"predecessor-version":[{"id":1522,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/1499\/revisions\/1522"}],"wp:attachment":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/media?parent=1499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/categories?post=1499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/tags?post=1499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}