Skip site navigation (1) Skip section navigation (2)

ODBC SQLNumResultCols broken?

From: Bill <bouma(at)cplane(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ODBC SQLNumResultCols broken?
Date: 2000-10-21 02:22:51
Message-ID: 39F0FDFB.1A08E6AB@cplane.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
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(at)cplane(dot)com>




Responses

pgsql-interfaces by date

Next:From: Kovacs Zoltan SandorDate: 2000-10-21 07:52:20
Subject: Re: ODBC SQLNumResultCols broken?
Previous:From: hubert depesz lubaczewskiDate: 2000-10-20 18:27:08
Subject: Re: Help for plpgsql!!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group