X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B74F4D1C50D for ; Wed, 3 Mar 2004 01:20:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 17814-01 for ; Tue, 2 Mar 2004 21:20:40 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 30CD6D1C50B for ; Tue, 2 Mar 2004 21:20:37 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i231Ka1Y029621 for ; Wed, 3 Mar 2004 01:20:36 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i23186hO027689 for pgsql-odbc@postgresql.org; Wed, 3 Mar 2004 01:08:06 GMT From: googleplex6000@yahoo.com (Joe) X-Newsgroups: comp.databases.postgresql.interfaces.odbc Subject: SQLDriverConnect hangs when DB inaccessible Date: 2 Mar 2004 17:08:08 -0800 Organization: http://groups.google.com Lines: 39 Message-ID: <74c02fb5.0403021708.27c95e68@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-odbc@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/19 X-Sequence-Number: 3821 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?