From: googleplex6000@yahoo.com
To: pgsql-odbc@postgresql.org
Subject: SQLDriverConnect hangs when DB inaccessible
Date: 2 Mar 2004 17:08:08 -0800
Message-ID: <74c02fb5.0403021708.27c95e68@posting.google.com> (raw)
When I call
SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource_.c_str(),
SQL_NTS, (UCHAR *) buf, sizeof (buf),
&buflen, SQL_DRIVER_COMPLETE);
from C++ code and the DB is accessible, the function returns as
expected. However, when the DB is inacessible, this function hangs
somewhere. There is obviously something happening, running "top"
shows my CPU usage near 100% until I control C out of my app.
Relevent versions of packages I'm using are
Red Hat Linux 9.0
PostgreSQL 7.4.1
psqlodbc 7.2.5
unixODBC 2.2.8
The relevant bits of my .odbc.ini file are
[postgres]
Driver = /usr/local/lib/psqlodbc.so
Setup = /usr/local/lib/libodbcpsqlS.so
Description = PostgreSQL Data Source
DSN = postgres
Servername = localhost
Port = 5432
Protocol = 7.4
UserName = myusername
Database = mydbname
ReadOnly = no
ServerType = Postgres
FetchBufferSize = 99
ServerOptions =
I build PostgreSQL, psqlodbc, unixODBC and my app using gcc/g++ 3.2.2.
Any ideas why things hang when the DB is inaccessible?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: googleplex6000@yahoo.com
Subject: Re: SQLDriverConnect hangs when DB inaccessible
In-Reply-To: <74c02fb5.0403021708.27c95e68@posting.google.com>
References: <74c02fb5.0403021708.27c95e68@posting.google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox