iODBC icon indicating copy to clipboard operation
iODBC copied to clipboard

Obscure error message "SQLDriverConnect = ?????????? (101) SQLSTATE=??1" for unicode psqlodbc

Open Jamedjo opened this issue 1 year ago • 1 comments

Using psqlodbcw.so from brew install psqlodbc produces the following error in iODBC, while working fine in unixodbc:

/Library/Application\ Support/iODBC/bin/iodbctest "DSN=db_with_unicode_driver"

Driver Manager: 03.52.1623.0502
1: SQLDriverConnect = ??????????????????????????????????????????򠁹?????????????????????????????????? (101) SQLSTATE=??1
1: ODBC_Connect = ??????????????????????????????????????????򠁹?????????????????????????????????? (101) SQLSTATE=??1

Connection is successful with the ascii driver psqlodbca.so but returns incorrect characters.

Connection also works with either driver with unixodbc via isql -v db_with_unicode_driver.

I'm on an M1 mac and the driver is Mach-O 64-bit bundle arm64.

The obscure error message in a 3rd party app made this hard to diagnose, so if this is an error that needs to be fixed in the driver it would still be super useful to improve the error message here.

Jamedjo avatar Jul 11 '24 20:07 Jamedjo

Looks like I was missing DriverUnicodeType=1, which wasn't needed for unixodbc.

Happy to close this, or can leave open for improving the error message when that is missing?

Jamedjo avatar Jul 11 '24 20:07 Jamedjo