Powershell 7 and the Get-ACEData module

Welcome Forums General PowerShell Q&A Powershell 7 and the Get-ACEData module

Viewing 1 reply thread
  • Author
    • #209031
      Topics: 86
      Replies: 138
      Points: 677
      Rank: Major Contributor

      I have just installed Powershell 7, and additionally:
      Microsoft Access Redistributable Enginer 2016 64-bit, and
      the ACE module for Powershell.  I confirmed the ACE installation with:

      help Get-ACEData -full

      and it checked out, i.e., I got back the full help messages.  But my existing code which still runs successfully in Powershell 5.1:

      $q = Get-ACEData -Filepath $DBLoc -Table Jobworked -Query $QUERY2
      $x = $q.$Tables[0].Rows[0]

      returned with errors under Powershell 7:

      InvalidOperation:  C:\Users\MyDocuments\
      $x = $q.$Tables[0].Rows[0]
      Cannot index into a Null array

      Would appreciate any tips, guidance or direction.  Thanks in advance.



      • This topic was modified 5 months ago by Ramon TAN.
    • #209073
      Senior Moderator
      Topics: 9
      Replies: 1265
      Points: 4,582
      Helping Hand
      Rank: Community Hero

      verify $q, $q.tables and $q.tables[0] has proper values.

      Try using -UseWindowsPowerShell option and Import the ACE module.

Viewing 1 reply thread
  • The topic ‘Powershell 7 and the Get-ACEData module’ is closed to new replies.