powershell add row to access mdb file

Welcome Forums General PowerShell Q&A powershell add row to access mdb file

This topic contains 3 replies, has 3 voices, and was last updated by

6 months, 1 week ago.

  • Author
  • #114028

    Topics: 1
    Replies: 1
    Points: 0
    Rank: Member

    Hi all,


    I'm trying on my win 7 pc to make a powershell script that adds a row to a access mdb file.(office 2013 32 bit).

    But it fails every time, I have already install AccessDatabaseEngine.exe but without success, my code and the error:

    $Ado = New-Object -ComObject ADODB.Connection 
    $recordset = New-Object -ComObject ADODB.Recordset$Ado.Open("Provider = Microsoft.ACE.OLEDB.12.0;Data Source=d:\test.mdb");

    Maar dan krijg ik : Exception calling "Open" with "1" argument(s): "Kan de voorziening niet vinden. Mogelijk is deze niet juist geïnstalleerd."At D:\importinaccess.ps1:28 char:12+ $Ado.Open <<<< ("Provider = Microsoft.ACE.OLEDB.12.0;Data Source=d:\test.mdb")+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException   Can someone help me please? Kind regards

  • #114054

    Topics: 8
    Replies: 736
    Points: 2,059
    Helping Hand
    Rank: Community Hero

    Open() Method requires 4 inputs, please see


    You can get this via PowerShell

    $Ado = New-Object -ComObject ADODB.Connection 
    $recordset = New-Object -ComObject ADODB.Recordset
    void Open (string, string, string, int)

    I have never used this, hence I don't have a working example of the same.

  • #114067

    Topics: 21
    Replies: 559
    Points: 993
    Helping Hand
    Rank: Major Contributor
  • #114079

    Topics: 1
    Replies: 1
    Points: 0
    Rank: Member

    Hi , thanks for your input.


    The problem was that i use an 32bit office, but powershell was 64bit.

    If i run powershell 32bit, it works 🙂



The topic ‘powershell add row to access mdb file’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort