{"id":511,"date":"2013-10-07T19:45:07","date_gmt":"2013-10-07T19:45:07","guid":{"rendered":"http:\/\/elbsolutions.com\/projects\/?p=511"},"modified":"2022-02-03T11:25:03","modified_gmt":"2022-02-03T17:25:03","slug":"getting-info-from-ms-access","status":"publish","type":"post","link":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/","title":{"rendered":"Getting info from MS Access"},"content":{"rendered":"<p>This is a note to keep myself clear on what technology is preferred and when to use it. I understand why programmers use explitives and the F-bomb- MS makes things SOOOO complicated (uninstall and reinstall the 2010 distributable &#8211; no matter how &#8216;installed&#8217; you think it is \ud83d\ude42 ). Basically Microsoft Access has flip flopped on whether or not ADO or DAO is the preferred choice &#8211; <a href=\"http:\/\/alexbarnett.net\/blog\/archive\/2006\/12\/05\/A-Short-History-of-the-Evolution-of-Microsoft-Data-Access-APIs.aspx\" target=\"_blank\" rel=\"noopener noreferrer\">here is a history article for interest sak<\/a>e. I used <a href=\"http:\/\/www.utteraccess.com\/wiki\/index.php\/Choosing_between_DAO_and_ADO\" target=\"_blank\" rel=\"noopener noreferrer\">this article to make my choice<\/a> and they mention lots of other options and details that are good to know. The project is to get MS Access records into AutoCAD tables. It is important to note that ADO and <a href=\"http:\/\/en.wikipedia.org\/wiki\/ADO.NET\" target=\"_blank\" rel=\"noopener noreferrer\">ADO.net<\/a> are not the same- except the 3 letters. <a href=\"http:\/\/www.utteraccess.com\/wiki\/index.php?title=ACEDAO&amp;action=edit\" target=\"_blank\" rel=\"noopener noreferrer\">ACEDAO <\/a>is the latest ADO and DAO is preferred after MS Access 2007 and is re-written from this version onwards. What references to set? I had troubles because my Excel test envuronmnent gave error 429: could not created an active x component. Here is what references worked<!--more-->(I am using Office 2010 and chose DAO):<\/p>\n<ul>\n<li>Microsoft Office Access 14.0 database engine object<\/li>\n<li>Microsoft Office 14.0 Object Library (not sure if that is ciritical for AutoCAD &#8211; I will update this post if it is required)<\/li>\n<li>DO NOT use DAO 3.6 or DAO 2.5<\/li>\n<\/ul>\n<p>OK (next day) &#8211; no go &#8211; &#8230; I really dislike getting data from MS Access&#8230;. I have Office 2010 64bit, AutoCAD ?? bit and Windows 7 64bit. Here are some links so I don&#8217;t forget<\/p>\n<ul>\n<li><a href=\"http:\/\/burnt-traces.com\/?p=92\" target=\"_blank\" rel=\"noopener noreferrer\">Making a proxy<\/a>\n<ul>\n<li>a couple lines wrap in the CDATA section &#8211; works but provides the error on the next line.<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/6340041\/using-a-c-sharp-dll-inside-excel-vba\/19260872#19260872\">Making VBA DLL&#8217;s in Visual Studio (C#)<\/a>\u00a0(it worked &#8211; see my comment in that article &#8211; and I am planning on putting proxy code in the stuff below!)\n<ul>\n<li>If you are doing this in c# include these lines\n<ul>\n<li>using System.Diagnostics;<br \/>\nusing RGiesecke.DllExport; (<a href=\"http:\/\/stackoverflow.com\/questions\/2043214\/unmanaged-exports-cannot-compile-assembly\">from here<\/a>)<\/li>\n<li>Ensure that anyCPU is your compile setting as x86 does NOT WORK. remember&#8230;.\n<ul>\n<li>AutoCAD 64bit<\/li>\n<li>Office 64bit<\/li>\n<li>Windows 7 64bit<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>This bullet went no where &#8211; even when my good buddy from \u00a0<a href=\"http:\/\/www.geekinc.ca\" target=\"_blank\" rel=\"noopener noreferrer\">geekinc <\/a>came to ensure I wasn&#8217;t doing some bonehead move. One thing is to UNinstall and REinstall the MS 2010 Access Redistributable and restart your machine &#8211; then you can install the 2007 drivers ALONGSIDE this which theoetically solve people&#8217;s issues (except mine as it were) .\u00a0<a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en-US\/1d5c04c7-157f-4955-a14b-41d912d50a64\/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine?forum=vstsdb\" target=\"_blank\" rel=\"noopener noreferrer\">MSDN &#8220;How to: fix error &#8216;the microsoft.ace.12.0&#8217; provider is not registered on this local machine<\/a>\n<ul>\n<li>I long ago down loaded the _64 version of the driver. I tried to install the other without the _64 but I already knew the answer from long ago. Sure enough &#8211; if you have 64 bit office &#8211; download the _64 version of the driver. Other wise you will be asked to uninstall the 32 bit version of office and reinstall the 64 bit (don&#8217;t)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The &#8220;making a proxy&#8221; works and using a dos\/wscript type link to running it through the Windows Cmd Line would work.<\/p>\n[dos]\n<p>Sub TryCL()<br \/>\nDim ObjExec<br \/>\nDim strFromProc<\/p>\n<p>Set objShell = CreateObject(&#8220;WScript.Shell&#8221;)<br \/>\nSet ObjExec = objShell.Exec(&#8220;cmd.exe \/c dir&#8221;)<br \/>\nDo<br \/>\nstrFromProc = ObjExec.Stdout.ReadLine()<br \/>\nDebug.Print &#8220;ABC &#8221; &amp; strFromProc &amp; &#8221; DEF&#8221;<br \/>\nLoop While Not ObjExec.Stdout.atEndOfStream<br \/>\nEnd Sub<\/p>\n[\/dos]\n<p>However, I might try a .net approach. Here are some links I have found<\/p>\n<ul>\n<li><a href=\"http:\/\/aucache.autodesk.com\/au2011\/sessions\/1882\/class_handouts\/v1_CP1882_Trachtenberg.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">whitepaper on coding that can be done via AutoCAD<\/a>\n<ul>\n<li><a href=\"http:\/\/usa.autodesk.com\/adsk\/servlet\/index?siteID=123112&amp;id=1911627\" target=\"_blank\" rel=\"noopener noreferrer\">official AutoCAD development platform info<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"http:\/\/exchange.autodesk.com\/autocad\/enu\/online-help\/browse#WS73099cc142f48755a52158612bd434e551-7fd5.htm\" target=\"_blank\" rel=\"noopener noreferrer\">AutoCAD .NET IntroPage<\/a>\n<ul>\n<li><a href=\"http:\/\/usa.autodesk.com\/adsk\/servlet\/index?siteID=123112&amp;id=18172834\" target=\"_blank\" rel=\"noopener noreferrer\">Debugging as you build .NET in AutoCAD<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/10113532\/how-do-i-fix-the-net-c-c-error-mismatch-between-processor-architecture\">http:\/\/stackoverflow.com\/questions\/10113532\/how-do-i-fix-the-net-c-c-error-mismatch-between-processor-architecture<\/a>\u00a0(AutoCAD dll advice in 3rd post)<\/li>\n<\/ul>\n<\/li>\n<li>Creating AutoCAD stuff:\u00a0<a href=\"http:\/\/www.theswamp.org\/\">http:\/\/www.theswamp.org\/<\/a><\/li>\n<li><a href=\"http:\/\/www.freevbcode.com\/ShowCode.asp?ID=5232\">Creating an XML object from OLEDB reader<\/a><\/li>\n<li><a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en-US\/ce4bdc40-6955-4e06-a7a5-41ae5135027a\/connecting-ms-access-database-in-c\">ADO.NET oledb examples<\/a><\/li>\n<li><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This is a note to keep myself clear on what technology is preferred and when to use it. I understand why programmers use explitives and the F-bomb- MS makes things SOOOO complicated (uninstall and reinstall the 2010 distributable &#8211; no matter how &#8216;installed&#8217; you think it is \ud83d\ude42 ). Basically Microsoft Access has flip flopped [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,15],"tags":[],"class_list":["post-511","post","type-post","status-publish","format-standard","hentry","category-general","category-ms-access"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Getting info from MS Access - ELB Solutions.com Inc.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting info from MS Access - ELB Solutions.com Inc.\" \/>\n<meta property=\"og:description\" content=\"This is a note to keep myself clear on what technology is preferred and when to use it. I understand why programmers use explitives and the F-bomb- MS makes things SOOOO complicated (uninstall and reinstall the 2010 distributable &#8211; no matter how &#8216;installed&#8217; you think it is \ud83d\ude42 ). Basically Microsoft Access has flip flopped [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/\" \/>\n<meta property=\"og:site_name\" content=\"ELB Solutions.com Inc.\" \/>\n<meta property=\"article:published_time\" content=\"2013-10-07T19:45:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-03T17:25:03+00:00\" \/>\n<meta name=\"author\" content=\"Etienne Bley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Etienne Bley\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/\"},\"author\":{\"name\":\"Etienne Bley\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"headline\":\"Getting info from MS Access\",\"datePublished\":\"2013-10-07T19:45:07+00:00\",\"dateModified\":\"2022-02-03T17:25:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/\"},\"wordCount\":600,\"articleSection\":[\"General\",\"MS Access\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/\",\"name\":\"Getting info from MS Access - ELB Solutions.com Inc.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\"},\"datePublished\":\"2013-10-07T19:45:07+00:00\",\"dateModified\":\"2022-02-03T17:25:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/getting-info-from-ms-access\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting info from MS Access\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\",\"name\":\"ELB Solutions.com Inc.\",\"description\":\"Bringing all your IT Pieces together\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\",\"name\":\"Etienne Bley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"caption\":\"Etienne Bley\"},\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/author\\\/etienne-bley\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting info from MS Access - ELB Solutions.com Inc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/","og_locale":"en_US","og_type":"article","og_title":"Getting info from MS Access - ELB Solutions.com Inc.","og_description":"This is a note to keep myself clear on what technology is preferred and when to use it. I understand why programmers use explitives and the F-bomb- MS makes things SOOOO complicated (uninstall and reinstall the 2010 distributable &#8211; no matter how &#8216;installed&#8217; you think it is \ud83d\ude42 ). Basically Microsoft Access has flip flopped [&hellip;]","og_url":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/","og_site_name":"ELB Solutions.com Inc.","article_published_time":"2013-10-07T19:45:07+00:00","article_modified_time":"2022-02-03T17:25:03+00:00","author":"Etienne Bley","twitter_misc":{"Written by":"Etienne Bley","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/#article","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/"},"author":{"name":"Etienne Bley","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"headline":"Getting info from MS Access","datePublished":"2013-10-07T19:45:07+00:00","dateModified":"2022-02-03T17:25:03+00:00","mainEntityOfPage":{"@id":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/"},"wordCount":600,"articleSection":["General","MS Access"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/","url":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/","name":"Getting info from MS Access - ELB Solutions.com Inc.","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/#website"},"datePublished":"2013-10-07T19:45:07+00:00","dateModified":"2022-02-03T17:25:03+00:00","author":{"@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"breadcrumb":{"@id":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/elbsolutions.com\/projects\/getting-info-from-ms-access\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elbsolutions.com\/projects\/"},{"@type":"ListItem","position":2,"name":"Getting info from MS Access"}]},{"@type":"WebSite","@id":"https:\/\/elbsolutions.com\/projects\/#website","url":"https:\/\/elbsolutions.com\/projects\/","name":"ELB Solutions.com Inc.","description":"Bringing all your IT Pieces together","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/elbsolutions.com\/projects\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39","name":"Etienne Bley","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","caption":"Etienne Bley"},"url":"https:\/\/elbsolutions.com\/projects\/author\/etienne-bley\/"}]}},"_links":{"self":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/comments?post=511"}],"version-history":[{"count":13,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/511\/revisions"}],"predecessor-version":[{"id":2837,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/511\/revisions\/2837"}],"wp:attachment":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/media?parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/categories?post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/tags?post=511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}