<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to connect to DAO library through visual lisp functions in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9329385#M20262</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have tried this link :&amp;nbsp;&lt;A href="https://adndevblog.typepad.com/autocad/2013/04/using-autolisp-to-read-an-access-database-via-ado.html" target="_blank" rel="noopener"&gt;https://adndevblog.typepad.com/autocad/2013/04/using-autolisp-to-read-an-access-database-via-ado.html&lt;/A&gt;&amp;nbsp; ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Olivier&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2020 21:56:29 GMT</pubDate>
    <dc:creator>O_Eckmann</dc:creator>
    <dc:date>2020-02-19T21:56:29Z</dc:date>
    <item>
      <title>How to connect to DAO library through visual lisp functions</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9326216#M20261</link>
      <description>&lt;P&gt;I did search under the provided mechanism and on the web in gnereal for this, you would think it would be more in demand, but I found nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm simply trying to get access to the regular, original MS database access object library DAO, that's inside every copy of MS Access, in my case it's in a .dll called&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\\Program Files\\Common Files\\microsoft shared\\OFFICE16\\ACEDAO.DLL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, when I&amp;nbsp;&lt;/P&gt;&lt;P&gt;(vlax-import-type-library :tlb-filename "C:\\Program Files\\Common Files\\microsoft shared\\OFFICE16\\ACEDAO.DLL")&lt;/P&gt;&lt;P&gt;it askes me if I want to enter a break loop because there's an "Assignment to protected symbol (XXXX)", it asks me several times, about symbols like "Append Chunk", "BeginTrans", "Cancel" (which are probably all in DAO), to which I respond NO to all, then the function returns T.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq DBEngine (vlax-create-object "DAO.DBEngine"))&lt;/P&gt;&lt;P&gt;returns nil.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;why doesn't (setq DBEngine (vlax-create-object "DAO.DBEngine")) work? The&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;question is, how does one create a "DBEngine" object from the "DAO"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;library, if not (setq DBEngine (vlax-create-object "DAO.DBEngine"))?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have any idea what to do?&amp;nbsp; This library is unbelieveably useful, surely these 2 unbuhlieveable products play nice with each other, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ivan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS - This was posted on the AutoCAD customization forum last week with no resolution so I thought I'd put it here and see if anyone knows on this forum too before I bother ADN support, wherever it is&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 19:38:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9326216#M20261</guid>
      <dc:creator>ivanstarr3</dc:creator>
      <dc:date>2020-02-18T19:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect to DAO library through visual lisp functions</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9329385#M20262</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have tried this link :&amp;nbsp;&lt;A href="https://adndevblog.typepad.com/autocad/2013/04/using-autolisp-to-read-an-access-database-via-ado.html" target="_blank" rel="noopener"&gt;https://adndevblog.typepad.com/autocad/2013/04/using-autolisp-to-read-an-access-database-via-ado.html&lt;/A&gt;&amp;nbsp; ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Olivier&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 21:56:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9329385#M20262</guid>
      <dc:creator>O_Eckmann</dc:creator>
      <dc:date>2020-02-19T21:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect to DAO library through visual lisp functions</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9331962#M20263</link>
      <description>Yes I have seen this post, but it won't do it. ADO sucks, I greatly prefer&lt;BR /&gt;DAO.&lt;BR /&gt;&lt;BR /&gt;Ivan&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Feb 2020 20:54:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9331962#M20263</guid>
      <dc:creator>ivanstarr3</dc:creator>
      <dc:date>2020-02-20T20:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect to DAO library through visual lisp functions</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9333735#M20264</link>
      <description>&lt;P&gt;This forum is for AutoCAD .NET API. You might get better responds from &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130" target="_blank" rel="noopener"&gt;Lisp forum&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With that said, DAO or ADO, whichever you think sucks, may not matter, because the real issue could be that you must use 64-bit MS Access DB Engine to match your 64-bit AutoCAD (you are not using 32-bit AutoCAD, are you?). VLisp's (vlax ....) functions use "in-process" COM API behind of the scene, so the data access engine must also be 64-bit when AutoCAD is 64-bit.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:36:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9333735#M20264</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2020-02-21T15:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect to DAO library through visual lisp functions</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9333797#M20265</link>
      <description>Norman, thanks for replying! How you doin'?&lt;BR /&gt;&lt;BR /&gt;I posted thei qn there first but when it went unsolved I posted it here in&lt;BR /&gt;.NET jic there's some brilliant dude here like you to help me out. Didn't&lt;BR /&gt;that work out nice?&lt;BR /&gt;&lt;BR /&gt;Anyway, yeah that's right, it's gotta be 64-bit too, BUT IT IS! because&lt;BR /&gt;it's THE database engine of ms Access and it comes with Access, but as far&lt;BR /&gt;as I know, instancing Access.Application does not allow you access to&lt;BR /&gt;DBEngine. DBEngine is the Top DAO object and it resides in ACEDAO.DLL, and&lt;BR /&gt;vlax-importing it, as in&lt;BR /&gt;&lt;BR /&gt;(vlax-import-type-library&lt;BR /&gt;:tlb-filename&lt;BR /&gt;"C:\\Program Files\\Common Files\\microsoft&lt;BR /&gt;shared\\OFFICE16\\ACEDAO.DLL"&lt;BR /&gt;:methods-prefix&lt;BR /&gt;"daom-"&lt;BR /&gt;:properties-prefix&lt;BR /&gt;"daop-"&lt;BR /&gt;:constants-prefix&lt;BR /&gt;"daoc-"&lt;BR /&gt;)&lt;BR /&gt;returns T, but then&lt;BR /&gt;(setq DBEngine (vlax-get-or-create-object "DAO.DBEngine"))&lt;BR /&gt;returns nil.&lt;BR /&gt;&lt;BR /&gt;So how do you get an instance of DBEngine, which is the top of the DAO&lt;BR /&gt;hierarchy, that's the question here, ONLY.&lt;BR /&gt;&lt;BR /&gt;If you can figure this one out, you're a dandy!&lt;BR /&gt;&lt;BR /&gt;Ivan&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Feb 2020 16:03:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9333797#M20265</guid>
      <dc:creator>ivanstarr3</dc:creator>
      <dc:date>2020-02-21T16:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect to DAO library through visual lisp functions</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9333870#M20266</link>
      <description>&lt;P&gt;So, you are saying that you do have the Access DB engine 64-bit installed (because of MS Access 64-bit, or MS Office suite 64-bit that including MS Access, installation)? If so, maybe, this discussion would be of help (pay attention to "Click-To-Run" mentioned in the answers):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/46462678/acedao-dbengine-available-from-access-but-not-from-net" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/46462678/acedao-dbengine-available-from-access-but-not-from-net&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 16:25:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9333870#M20266</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2020-02-21T16:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to connect to DAO library through visual lisp functions</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9334100#M20267</link>
      <description>Norman,&lt;BR /&gt;&lt;BR /&gt;Hmmm very interesting as it's confirming behavior I just noticed.... After&lt;BR /&gt;some woman suggested instantiating MSAccess thinking that's what I really&lt;BR /&gt;wanted, at first I wrongly assumed that DBEngine wouldn't be accessible,&lt;BR /&gt;but a few days later I thought about how stupid that would be and how&lt;BR /&gt;complete the object model is, so I looked at the Access object model and&lt;BR /&gt;there it was, right off the application - Application.DBEngine! So I&lt;BR /&gt;instantiated it and then the DBEngine in VLisp with the following code -&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(setq MSAccess (vlax-create-object "Access.Application"))&lt;BR /&gt;(setq DBEngine (vlax-get-property MSAccess 'DBEngine))&lt;BR /&gt;(setq Workspace (vlax-invoke DBEngine 'CreateWorkspace "AccessWorkspace"&lt;BR /&gt;"Admin" "" '""))&lt;BR /&gt;(setq DB (vlax-invoke Workspace 'OpenDatabase "C:\\BA\\BA.mdb"))&lt;BR /&gt;(setq rstEmployeesRecordset (vlax-invoke DB 'OpenRecordset "SELECT Name&lt;BR /&gt;FROM [Employees];"))&lt;BR /&gt;(setq nNumRecords (vlax-get-property rstEmployeesRecordset 'RecordCount))&lt;BR /&gt;(vlax-invoke rstEmployeesRecordset 'MoveLast)&lt;BR /&gt;(vlax-invoke rstEmployeesRecordset 'MoveFirst)&lt;BR /&gt;(setq nNumRecords (vlax-get-property rstEmployeesRecordset 'RecordCount))&lt;BR /&gt;(setq EmployeeRecords (vlax-safearray-&amp;gt;list (vlax-invoke&lt;BR /&gt;rstEmployeesRecordset 'GetRows nNumRecords)))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And IT WORKED (right up to the 'GetRows invocation, but thats another&lt;BR /&gt;error)! BUT I NEVER was able to access the DBEngine object outside of&lt;BR /&gt;Access.Application! WOW! just like what that article talks about. I&lt;BR /&gt;still however would love to know from a horse's mouth what the official&lt;BR /&gt;disposition of all this is, ie how do you get a DBEngine object without,&lt;BR /&gt;and outside of, Access?&lt;BR /&gt;</description>
      <pubDate>Fri, 21 Feb 2020 18:14:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-connect-to-dao-library-through-visual-lisp-functions/m-p/9334100#M20267</guid>
      <dc:creator>ivanstarr3</dc:creator>
      <dc:date>2020-02-21T18:14:01Z</dc:date>
    </item>
  </channel>
</rss>

