How to connect to DAO library through visual lisp functions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
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
C:\\Program Files\\Common Files\\microsoft shared\\OFFICE16\\ACEDAO.DLL.
Now, when I
(vlax-import-type-library :tlb-filename "C:\\Program Files\\Common Files\\microsoft shared\\OFFICE16\\ACEDAO.DLL")
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.
But then
(setq DBEngine (vlax-create-object "DAO.DBEngine"))
returns nil.
why doesn't (setq DBEngine (vlax-create-object "DAO.DBEngine")) work? The
question is, how does one create a "DBEngine" object from the "DAO"
library, if not (setq DBEngine (vlax-create-object "DAO.DBEngine"))?
Anyone have any idea what to do? This library is unbelieveably useful, surely these 2 unbuhlieveable products play nice with each other, right?
Thanks,
Ivan
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