The problem arises in HandleException, which creates an Error object which in turn creates a Diagnostic object that invokes SQLGetDiagRec(). The issue here is the connection handle is invalid, and when the iODBC code for SQLGetDiagRec() is executed, there is no valid connection handle and the app hangs.
That must be something iODBC specific. On windows (and unixODBC) that is handled properly:
- Code: Select all
Driver found: PostgreSQL ANSI (APILevel=1)
PostgreSQL DSN NOT found, will attempt to connect without it.
!!! WARNING: Connection failed. PostgreSQL tests will fail !!!
ODBC Error: ODBC handle exception
ODBC Diagnostic record #1:
SQLSTATE = 08001
Native Error Code = 101
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
I will investigate this issue for the release. In the meantime, if you can find a workaround, it would be much appreciated. At any rate, you can file a [https://sourceforge.net/tracker/?group_id=132964&atid=725709|bug report].