pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas <maps.on@gmx.net>
To: Jeff Eckermann <jeff_eckermann@yahoo.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: ms-access and booleans ?
Date: Tue, 20 Jan 2004 01:16:23 +0100
Message-ID: <400C7357.7090704@gmx.net> (raw)
In-Reply-To: <20040119153613.31921.qmail@web20813.mail.yahoo.com>
References: <20040119153613.31921.qmail@web20813.mail.yahoo.com>

Jeff Eckermann wrote:

>--- Andreas <maps.on@gmx.net> wrote:
>  
>
>>I Access I get an Error:
>>ODBC-Call failed.
>>Error: Operator doesn't exist:  boolean = integer
>>(#7)
>>
>>In the System-DSN I have
>>Bool as Char :   NO
>>True is -1 :    YES
>>    
>>
>
>You should have success by playing with these
>settings.  I use different settings, but that is a
>historical matter. I believe that the ODBC driver
>handling of booleans for MS Access has been optimized
>somewhat in recent releases.  Probably just setting
>"bool as char" to true will do it.  But I admit that I
>haven't played with these lately, not wanting to mess
>up a working setup.
>  
>

No way :(
The problem lies in the way a SELECT is handled by Access.

I have a test table with a bool-column called "bol".

Access generates :
SELECT test1.*
FROM test1
WHERE (((test1.bol)=True));

Trying this Access throws an error which says there is no comparison 
function between boolean and integer.

In contrast pgAdmin as well as psql run the same query without complaints.
Both show the bool-column as t or f.
Access would display 0 / -1.

Interestingly I can enter TRUE or FALSE into the table view of this 
table within Access.
TRUE gets translated to -1 and FALSE to 0.
Even 1 gets translated to -1.

But no way I could use the bool-column in an Access query as criterium, 
if not "bool as char" is set.
Then I can query  bol = "t"
On the other hand "bool as char" breaks the Access check boxes. 
Initially they show the bool-values correctly but if I try to set a 
checkbox to TRUE I get an error that the value was too big for the 
column. I guess "-1" doesn't fit into PG's BOOLEAN which is CHAR(1) as 
far as I know.


Live s*cks I tell ya.   =8-}











view thread (5+ messages)  latest in thread

Message-ID: <400C7357.7090704@gmx.net>
Permalink:  ../400C7357.7090704@gmx.net/
Also on:    postgresql.org/message-id/400C7357.7090704@gmx.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: maps.on@gmx.net, jeff_eckermann@yahoo.com
  Subject: Re: ms-access and booleans ?
  In-Reply-To: <400C7357.7090704@gmx.net>
  References: <20040119153613.31921.qmail@web20813.mail.yahoo.com> <400C7357.7090704@gmx.net>

* 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