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

RE: Postgres odbc driver bug

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Keith Millard" <Kmillard(at)pumatech(dot)com>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: Postgres odbc driver bug
Date: 2001-05-05 03:43:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfacespgsql-odbc
Please try the latest driver 7.01.0005.
It solves several parameter handling problems.

Hiroshi Inoue
  -----Original Message-----
  From: pgsql-interfaces-owner(at)postgresql(dot)org
[mailto:pgsql-interfaces-owner(at)postgresql(dot)org]On Behalf Of Keith Millard
  Sent: Tuesday, May 01, 2001 10:37 PM
  To: 'pgsql-interfaces(at)postgresql(dot)org'
  Subject: [INTERFACES] Postgres odbc driver bug

  We have found a reproducible problem with the Postgres ODBC driver.  It
has to do with the parameter replacement feature in the driver.  Below is a
piece of test code that shows the problem.  We were able to fix the problem
by making a change to execute.c in the ODBC driver code (attached).

  odbc driver version : Found in both 6.50 and 7.01.0004.

  postgresql database version : Found with both 7.0.2 and 7.0.3 versions of

  Server Operating System: Windows2000

  Client Operation System: Windows2000

  Explanation of the odbc driver bug:

      * If we set the buffer that we binded to column "text1" now, it will
      * The SQLExecute in doQuery() will succeed (finding 0 rows), and the
      * SQLFetchScroll call will return SQL_NO_DATA_FOUND.
      * This is because of a bug in the odbc driver. The call to
      * will execute the query in the driver, but the buffer that is binded
      * empty, so no rows will be found.  This of course assumes that the
      * doesn't contain any empty records for the "text1" column, which is
      * for our test.  Then when we call SQLExcute, the driver will realize
it has
      * already done the query work and will not do it again, even though
      * buffer for parameter substitution has changed (next line of code
      * this comment).

   Zip file is attached.  The code is currently set up to fail, but I
describe in my comments that you can uncomment the code that sets the buffer
before SQLNumResultCols to make things will work.

  Thanks for your attention,

  Keith Millard

In response to

pgsql-odbc by date

Next:From: Rony KhouryDate: 2001-05-07 09:25:36
Subject: encrypt odbc transactions?
Previous:From: Julio Csar GzquezDate: 2001-05-04 23:50:48
Subject: How to enable ODBC access in Windows

pgsql-interfaces by date

Next:From: Peter EisentrautDate: 2001-05-05 12:54:05
Subject: Re: PyGreSQL: is broken in RC1
Previous:From: Bruce MomjianDate: 2001-05-04 22:25:48
Subject: Re: PyGreSQL: is broken in RC1

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