I am trying to query an MS Access DB from a PowerShell script using a fairly routine SQL statement and am running into a strange error. I am using the methodology outlined here:
Which works fine for a standard SQL query. But I want to use a WHERE statement in my query. So line six would look like:
* From Computers WHERE operating_system = 'Windows XP'", $objConnection,$adOpenStat
But when I execute this line in PowerShell I get an error stating that the function call cannot accept five parameters. Unfortunatly nothing I try helps me get around this issue. I've tried -eq in place of the equals sign, placing the SQL in parentheses, etc and had no joy.
Does anyone know how to get around this issue?