Re: Bug report - ODBC Driver - Error 42P18

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Consolity Inc <consolity(at)outlook(dot)com>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Bug report - ODBC Driver - Error 42P18
Date: 2014-02-28 16:50:52
Message-ID: 5310BE6C.4080608@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 02/28/2014 06:20 PM, Consolity Inc wrote:
> The PostgreSQL ANSI ODBC driver reports 42P18 - ERROR: could not determine data type of parameter $<n>; when preparing SQL with an expression of the form:
> <bound parameter> IS NULL.
> This is a breaking change to existing code that depends on being able to check the NULL-ness of a parameter.
> Behavior is new as of psqlODBC 09.03.0100

The default for UseServerSidePrepare changed in 09.03.0100. Maybe it's
because of that? You can try setting UseServerSidePrepare=0 to get the
old behavior.

I would recommend modifying the query to explicitly cast the parameter,
though. Something like "?::text IS NULL" should work.

- Heikki

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Heikki Linnakangas 2014-02-28 17:25:17 Re: UUID, UUID-OSSP extension, and ODBC issue
Previous Message Adrian Klaver 2014-02-28 16:32:03 Re: Bug report - ODBC Driver - Error 42P18