locked
Access 32 bit and AutoCAD 64 bit, VBA RRS feed

  • Question

  • I have a VBA application for AutoCAD that I have been developing since 2001 that updates a Microsoft Access 2002/2003 format database ".mdb" file (which still works in 2010).  Since AutoCAD has updated to a 64 bit VBA, I can no longer connect to these Access database files.  Since this program is very complex, re-writing it will take time, plus, I need to be able to use computers that still have 32 bit AutoCAD and Access 2002 so this is not really an option right now.  I am using DAO, but the way the program was written, updating to ADO is not a huge problem.  Is there a connectstring that will help me?  Or maybe some DLL I need to download.  Note: I am an Electrical Engineer doing programming out of necessity, not a high level programmer.
    Tuesday, May 20, 2014 2:59 PM

All replies

  • All you have to do is re-declare any libraries you have used in the code to handle 64 bit coding. This involves mainly using PtrSafe declarations.

    Happy to help ! When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answered

    Tuesday, May 20, 2014 4:27 PM
  • Hi,

    According to your description, you are developing VBA application for AutoCAD. party application. About connecting to Access database files in AutoCAD, I suggest you posting in AutoCAD official VBA forum or VBA forum for more efficient responses.

    Thanks.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 27, 2014 8:13 AM
  • I already added the ptrsafe, this is not the problem.  I am trying to connect to an "mdb" database which is 32 bit using the 64 bit AutoCAD.  The 32 bit AutoCAD has no problem.  I saw a post somewhere that suggested un-installing Office 32 bit (which was installed by default by the computer manufacturer) and re-install 64 bit.  I have gotten to a point where i get the message "provider not found" or "uninstallable isam" will 64 bit office fix the problem?
    Tuesday, May 27, 2014 1:11 PM
  • Could you connect to Access database successfully form AutoCAD? If so, it means you could connect to it. Then you'd better provide VBA sample code for us to understand you.

    Friday, May 30, 2014 2:07 AM
  • After much research over the last several months, I have found that the problem involves several issues.  I was able to work around these problems on my own.

    1) I am using AutoCAD 2014, 64 bit on a 64 bit computer with Microsoft Office 2010, 32 bit installed (this is the default from Microsoft).  

    Answer) Microsoft has opted to ignore the need to maintain existing computers while upgrading other computers, VBA programs which need to operate in 64 bit AutoCAD require the 64 bit office.  However, be advised, if you have a 32 bit ".mde" or ".mccde" file, Access 64 bit will not open it, conversely, Access 32 bit will not open a 64 bit ".mde" or ".mccde" file

    2) I have several files that must be encrypted in order to keep database 1 user from doing things that might affect all users in a negative way.  IS THERE SOME OTHER WAY TO ENCRYPT files so that I can open them with 64 bit Access and 32 bit Access?

    3) Apparently DAO will no longer work with Microsoft Office 64 bit, although it does still work in 32 bit.

    Answer) convert all DAO to ADO

    Further questions: How long will ADO continue to work?  What other problems will I have using Word, Excel, Access, Outlook, Powerpoint, etc...?

    Tuesday, July 8, 2014 1:07 PM