none
Using ACE drivers and ADO.Net to access ACCESS 2007 and EXCEL 2007 files RRS feed

  • Question

  • I have read and studied the post by one of the Scripting Guys at:

    https://blogs.technet.microsoft.com/heyscriptingguy/2011/05/04/use-ace-drivers-and-powershell-to-talk-to-access-and-excel/#comment-1404225

    I followed the instructions to import/install ACE:

    1. download the ACE.psm1 file from another website and keep in ...\Documents\WindowsPowerShell\Modules\ACE

    2. Execute the command:  Import-Module ace

    When I performed all of the above, nothing happened. I simply got the PS prompt back.  No error messages,

    I am interested in using ACE drivers and ADO.net directly with PS to access ACCESS 2007 databases and EXCEL 2007 files

    I keep getting stucked at the Open() method when the connection string is passed:

      <xxx> .Open("Provider=Microsoft.ACE.OleDB.12.0, Dat Source=C:\Documents\myfile.mdb")

    It keeps telling me the Provider is not properly installed or not installed.

    Would be grateful for any helpful tips, advice and/or pointers.

    Many thanks.

    R.Tan

    rst1951@outlook.com


    R.Tan

    Thursday, June 28, 2018 6:52 AM

Answers

All replies

  • You have to install the ACE drivers to make the ACE module work.

    https://www.microsoft.com/en-us/download/details.aspx?id=13255


    \_(ツ)_/

    • Marked as answer by RomanTan Thursday, June 28, 2018 7:32 AM
    Thursday, June 28, 2018 6:58 AM
  • Thank you very much -- I'm sorry I forgot this step.

    I now have a follow-up question to this:  the download site for Microsoft Access Driver Engine 2010 Redistibutable gave me a choice of 32-bit or 64-bit.  I downloaded both.

    My dilemma is as follows:   I have a 64-bit Windows 7 (Home Premium Ed.) OS, but my Office 2007 suite (Word, Excel, PPoint, Access, Outlook) is 32-bit.

    When I attempted to install the 64-bit version, the installer rejected it and explicitly stated that my Office products are 32-bit.  So I installed the 32-bit version, which went OK, but when I ran the command:

    Import-Module ace

    nothing happened.  Is there a solution to this?

    Sincerest thanks for your assistance.

    R.Tan


    R.Tan


    • Edited by RomanTan Thursday, June 28, 2018 7:32 AM forgot alert
    Thursday, June 28, 2018 7:31 AM
  • You have to install the 64 bit version or run the 32 bit version of PowerShell.

    Office 2007 has been out-of-support for years.  You should not be using it.  You can get Office 2016 for $99 from the MSN Office site.


    \_(ツ)_/


    • Edited by jrv Thursday, June 28, 2018 7:39 AM
    • Marked as answer by RomanTan Thursday, June 28, 2018 7:41 AM
    Thursday, June 28, 2018 7:38 AM
  • OK, thanks.

    Much appreciated.

    Sincerely,

    R.Tan


    R.Tan

    Thursday, June 28, 2018 7:41 AM