Reputation: 11
I am running QuickBooks Premier 2019 (Desktop) on a Windows 10 64 bit computer. I installed QODBC. I tried running the Powershell script below provided at the flexquarters website. I get this error:
Exception calling "Open" with "0" argument(s): "ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application"
$connectstring = "DSN=QuickBooks Data;"
$sql = "Select TOP 10 Name from Customer"
$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)
$conn.open()
$cmd = New-Object system.Data.Odbc.OdbcCommand($sql,$conn)
$da = New-Object system.Data.Odbc.OdbcDataAdapter($cmd)
$dt = New-Object system.Data.datatable
$null = $da.fill($dt)
$conn.close()
$dt
Upvotes: 0
Views: 334
Reputation: 11
SOLVED - have to use the 'QuickBooks Data 64-Bit QRemote' data source
Upvotes: 0