{"id":1366,"date":"2021-04-24T17:41:51","date_gmt":"2021-04-24T09:41:51","guid":{"rendered":"https:\/\/www.yohz.com\/blogs\/?p=1366"},"modified":"2021-04-24T17:44:43","modified_gmt":"2021-04-24T09:44:43","slug":"using-access-ole-import","status":"publish","type":"post","link":"https:\/\/www.yohz.com\/blogs\/2021\/04\/24\/using-access-ole-import\/","title":{"rendered":"Using Access OLE Import"},"content":{"rendered":"<p><a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> is a Windows application that uploads files into OLE Object-type fields in your databases.\u00a0 Most of the time, we are uploading into Access databases, but it can also be\u00a0 client server databases like SQL Server, PostgreSQL, MariaDB\/MySQL because Access is popularly used as a front-end to these databases.<\/p>\n<h3>Backup, backup, backup<\/h3>\n<p>The first step is the most important &#8211; back up your database first.\u00a0 <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> makes changes to your tables, and having a backup lets you revert to a working database if anything goes wrong.<\/p>\n<h3>Preparing the data file<\/h3>\n<p>The next step is to prepare a data file.\u00a0 This is an Excel worksheet containing the data to upload.\u00a0 If you only want to insert files into a table, your data file would contain a single column, where the column header defines the field name to upload into and the <strong>filecontent<\/strong> identifier so that <a href=\"https:\/\/www.yohz.com\/aoi_details.htm\">Access OLE Import<\/a> will upload the contents of the listed files.\u00a0 E.g.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1367\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using01.png\" alt=\"\" width=\"423\" height=\"284\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using01.png 423w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using01-300x201.png 300w\" sizes=\"(max-width: 423px) 100vw, 423px\" \/><\/p>\n<p>Here, we want to upload the contents of the listed files into the <strong>document<\/strong> field.<\/p>\n<p>If we want to update existing rows, we will need to provide one or more key values e.g.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1368\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using02.png\" alt=\"\" width=\"572\" height=\"287\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using02.png 572w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using02-300x151.png 300w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/p>\n<p>Here, we are providing the definition that <strong>documentID<\/strong> is an integer-type key value.<\/p>\n<p>Note that you can also use Libre Office or Open Office to create the data file.\u00a0 You just need to save the spreadsheet in the Excel format (xlsx or xls).<\/p>\n<h3>Run the Upload Wizard<\/h3>\n<p>Probably the easiest step.\u00a0 Connect to your database, enter the name of the table you want to upload into, select the data file, upload type, object type, and you&#8217;re done.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1369\" src=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using03.png\" alt=\"\" width=\"755\" height=\"633\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using03.png 755w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using03-300x252.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2021\/04\/aoi_using03-624x523.png 624w\" sizes=\"(max-width: 755px) 100vw, 755px\" \/><\/p>\n<p>See also:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.yohz.com\/blogs\/2021\/04\/24\/introducing-access-ole-import\/\">introducing Access OLE Import<\/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\/2021\/04\/24\/using-access-ole-import\/\" action=\"like\" colorscheme=\"light\" layout=\"button\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.yohz.com\/blogs\/2021\/04\/24\/using-access-ole-import\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Access OLE Import is a Windows application that uploads files into OLE Object-type fields in your databases.\u00a0 Most of the time, we are uploading into Access databases, but it can also be\u00a0 client server databases like SQL Server, PostgreSQL, MariaDB\/MySQL because Access is popularly used as a front-end to these databases. Backup, backup, backup The [&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\/1366"}],"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=1366"}],"version-history":[{"count":3,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/1366\/revisions"}],"predecessor-version":[{"id":1374,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/1366\/revisions\/1374"}],"wp:attachment":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/media?parent=1366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/categories?post=1366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/tags?post=1366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}