It was 2018, and I was maintaining a legacy production line reporting system for a mid-sized manufacturing plant. The core database was PostgreSQL 9.6 running on a Linux server. The front-end was a vintage Windows 7 Professional 32-bit machine in the quality control lab. On this machine ran an ancient Excel 2010 VBA macro that pulled defect data every 15 minutes, generated charts, and printed them to a network label printer.
On Windows 7 32-bit with PostgreSQL ODBC, the newest driver is not your friend — especially if you have bytea columns or use client-side cursors. Test with 9.0 or 9.2, and always check the 32-bit administrator. postgresql odbc driver windows 7 32 bit
The VBA macro threw error -2147467259 (Unspecified error) at the conn.Open line. The data source name (DSN) was configured in User DSN using the PostgreSQL ANSI(x64) driver. Except… Windows 7 32-bit doesn’t have an x64 driver. That was my first clue something was very wrong. It was 2018, and I was maintaining a
I opened the ( C:\Windows\System32\odbcad32.exe ) — no DSN listed. Opened the 32-bit version ( C:\Windows\SysWOW64\odbcad32.exe ) — the DSN was there, but it was marked as using PostgreSQL ANSI (no x64). So far so good. On this machine ran an ancient Excel 2010
For five years, it worked perfectly. Then one Monday, the chart stopped updating.
I reinstalled the latest psqlodbc_09_03_0300-x86.msi (32-bit driver). No change. I downgraded to version 9.2 — still failed. Then I noticed something odd: The driver’s configuration dialog had a checkbox labeled — but the value kept resetting to unchecked after saving.