Received: from cplane.com (jersey.cplane.com [63.193.105.226]) by hub.org (8.10.1/8.11.0) with SMTP id e9L2N6J65442 for ; Fri, 20 Oct 2000 22:23:07 -0400 (EDT) (envelope-from bouma@cplane.com) Received: (qmail 9838 invoked from network); 21 Oct 2000 01:00:04 -0000 Received: from unknown (HELO texas.cplane.com) (unknown) by unknown with SMTP; 21 Oct 2000 01:00:04 -0000 Received: (qmail 15757 invoked from network); 21 Oct 2000 02:22:51 -0000 Received: from unknown (HELO cplane.com) (unknown) by unknown with SMTP; 21 Oct 2000 02:22:51 -0000 Message-ID: <39F0FDFB.1A08E6AB@cplane.com> Date: Fri, 20 Oct 2000 19:22:51 -0700 From: Bill X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: ODBC SQLNumResultCols broken? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200010/179 X-Sequence-Number: 1536 The ODBC book I have claims that if, after execution, a statement has no result data, then SQLNumResultCols(statement, &ncols) returns ncols == 0. TRUE? FALSE? If TRUE, then postgresql ODBC driver (latest stuff) is broken because it always returns the number of '?' there are in the SQL query statement no matter if any rows were returned by the execute. What I am really trying to do is test existence of an index "id" in a table. I call SQLExecute() on a prepared statement that looks like this: "select id from tablename where id = ?" Parameter is bound, everything returns success. Now I can tell if the id is in the table if any rows were returned from this query. Is there some other or better way to do this? Of course, postgresql ODBC and JDBC drivers are still broken in the ways I have reported before, but no one seems to care. 8^( Bill