Received: from message.fucam.ac.be (message.fucam.ac.be [193.190.244.2]) by hub.org (8.9.1/8.9.1) with ESMTP id JAA05421 for ; Thu, 14 Jan 1999 09:10:22 -0500 (EST) (envelope-from jourquin@message.fucam.ac.be) Received: from fucam.ac.be (fucam249.fucam.ac.be [193.190.244.249]) by message.fucam.ac.be (8.9.0/8.9.0) with ESMTP id PAA21440 for ; Thu, 14 Jan 1999 15:05:23 +0100 (MET) Sender: bart@message.fucam.ac.be Message-ID: <369DFA75.CDEB2B4F@fucam.ac.be> Date: Thu, 14 Jan 1999 15:08:53 +0100 From: "Bart A.M. Jourquin" Organization: F.U.Ca.M X-Mailer: Mozilla 4.5 [en] (X11; I; SunOS 5.6 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: [interface] IODBC : How to fetch errors? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I'm using PostgreSQL 6.4 on Solaris 2.6 and try to develop Unix programs connecting to the database via IODBC and PostgreSQL ODBC driver for UN*X (v 0.11). I have no problems to connect and query my database, but it seems that SQLError doesn't return any error string! The folowing code infinitely loops while "buf" and "sqlstate" are empty strings... /* Get statement errors */ while (SQLError (henv, hdbc, hstmt, sqlstate, NULL, buf, sizeof(buf), NULL) == SQL_SUCCESS) { fprintf (stderr, "%s, SQLSTATE=%s\n", buf, sqlstate); } Using the same code on a Windows computer (remote) connected via the PostgreSQL ODBC driver 6.40.0001 on the same database gives the correct results. My questions are: 1.) Is the problem related to IODBC or to PostgreSQL ODBC driver for UN*X ? 2.) Is it a known problem with a known fix? Any suggestion? Many thanks in advance -- Dr Bart A.M. JOURQUIN, Senior researcher F.U.Ca.M. - Group Transport & Mobility (GTM) Ch. de Binche, 151a, B7000 Mons, Belgium Phone +32 (65) 32.32.93 Fax +32 (65) 32.56.91 http://www.fucam.ac.be/~jourquin