none
ADODB.Connection error : 800A0E7A RRS feed

  • Question

  • I'm coding a ruby script that has to write data in an existing Access Database. With following code I don't manage to make a connection with the database: 

    require 'win32ole'
    connection = WIN32OLE.new('ADODB.Connection')
    connection.Open('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\ex1_student.mdb')

    Error: 800A0E7A - "Provider cannot be found. It may not be properly installed." 

    Access 2010 32-bit and Windows 10 64-bit OS. I did find questions with the same error, but the solutions doesn't seem to apply for me.




    • Edited by RutsT Tuesday, September 1, 2015 12:25 PM
    Tuesday, September 1, 2015 12:03 PM

All replies

  • Hi RutsT,

    Based on your description, you installed Access 2010, but in your code, you used Microsoft.ACE.OLEDB.12.0. As far as I know, the provider of Access 2010 is Microsoft.ACE.OLEDB.14.0, and the Microsoft.ACE.OLEDB.12.0 is the provider of Access 2007. Do you install the AccessDatabaseEngine.exe independently? I suggest you use 14.0 instead of 12.0.

    In addition, I suggest you do as below to check the provider available in your machine.
    1.Goto Control Panel
    2.Goto Administrator Tools
    3.Goto Data Sources (ODBC)
    4.Click the "Drivers" tab.

    Best Regards,

    Edward


    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.


    Wednesday, September 2, 2015 8:45 AM
    Moderator
  • Hi Edward,

    Changing the provider to 14.0 does not change anything to the given error. I also did install the AccessDatabaseEngine.exe (2010) and I also tried the 2007 engine as suggested in a post on MSDN. No results.

    For the Data Sources>Drivers, I don't know which driver to look for. These are the drivers that have something to do with MS Access:

    • Driver do Microsoft Access (*.mdb)
    • Microsoft Access driver (*.mdb)
    • Microsoft Access driver (*.mdb, *accdb)
    • MS Access Paradox driver
    • MS Access Text Driver
    • MS Access-Treiber

    Hopefully this helps you to find the problem.

    Kind regards

    RutsT

    Wednesday, September 2, 2015 9:33 AM
  • Hi RutsT,

    I am not familiar with ruby script, I am not sure whether there is something wrong in your code. To make a further troubleshooting, I suggest you create a connection with vba code in Access database with the same connectionstring.

    You could refer the link below for adodb.connection in access database.

    # Connection Object (ADO)

    https://msdn.microsoft.com/en-us/library/office/jj249940.aspx

    Best Regards,

    Edward


    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.


    Thursday, September 3, 2015 9:08 AM
    Moderator
  • Hi RutsT,

    Have your issue been resolved? If you have, it would be appreciated if you could share us your solution. If not, could you share us your current situation?

    Best Regards,

    Edward


    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.


    Monday, September 14, 2015 8:38 AM
    Moderator
  • Looking at your Access file, it has a file extension of .mdb.  This means that the file is either 2003 or earlier.  I don't work in Ruby, however, from what I've read, you may need to use the following:

    require 'win32ole'
    connection = WIN32OLE.new('ADODB.Connection')
    connection.Open('Provider=Microsoft.Jet.OLEDB.4.0;
                     Data Source=c:\path\filename.mdb')

    Monday, September 14, 2015 11:19 AM
  • and if you installed Office 2013 on your computer, what do you do now?

    Tuesday, August 1, 2017 1:26 PM
  • Your code should work if your Ruby script is running 32-bit. If it's running 64-bit then the code will not be able to load the 32-bit ACE OLEDB Provider or Jet OLEDB Provider.

    If you have 32-bit Access 2010 installed then I would expect that you would have the 32-bit ACE OLEDB Provider installed. You just need to make sure the Ruby script is running under that same processor architecture.

    Hopefully, this helps someone looking at a two year-old post. ;-)


    Paul ~~~~ Microsoft MVP (Visual Basic)


    Tuesday, August 1, 2017 3:17 PM