Overview
Features
Download
Documentation
Community
Add-Ons & Services

ODBCException calls SQLGetDiagRec on ConnectionException

Please post support and help requests here.

ODBCException calls SQLGetDiagRec on ConnectionException

Postby argoneus » 15 Jul 2008, 00:56

I'm using the 1.3.3 branch, r667. I've noticed when creating a Session object that's invalid (non-existent driver or something else), PocoData will correctly trigger a ConnectionException in SessionImpl open() (line 96).

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.
argoneus
 
Posts: 12
Joined: 19 Oct 2006, 19:03

Re: ODBCException calls SQLGetDiagRec on ConnectionException

Postby alex » 15 Jul 2008, 11:23

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
===================
Connection:Not applicable
Server:Not applicable
===========================
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].
alex
 
Posts: 1142
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Re: ODBCException calls SQLGetDiagRec on ConnectionException

Postby argoneus » 15 Jul 2008, 20:57

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].

I will certainly file a bug report when I can gather more info. In the meantime, I've noticed that ODBCColumn.cpp doesn't support a boolean type, and I've filed a [https://sourceforge.net/tracker/index.php?func=detail&aid=2018869&group_id=132964&atid=725709|bug report] for it.
argoneus
 
Posts: 12
Joined: 19 Oct 2006, 19:03


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest