pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill <bouma@cplane.com>
To: pgsql-interfaces@postgresql.org
Subject: ODBC SQLNumResultCols broken?
Date: Fri, 20 Oct 2000 19:22:51 -0700
Message-ID: <39F0FDFB.1A08E6AB@cplane.com> (raw)

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 <bouma@cplane.com>






view thread (3+ messages)  latest in thread

Message-ID: <39F0FDFB.1A08E6AB@cplane.com>
Permalink:  ../39F0FDFB.1A08E6AB@cplane.com/
Also on:    postgresql.org/message-id/39F0FDFB.1A08E6AB@cplane.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: bouma@cplane.com
  Subject: Re: ODBC SQLNumResultCols broken?
  In-Reply-To: <39F0FDFB.1A08E6AB@cplane.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