pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <aklaver@comcast.net>
To: pgsql-odbc@postgresql.org
Subject: Re: ms-access and booleans ?
Date: Tue, 20 Jan 2004 07:07:21 -0800
Message-ID: <200401200707.21552.aklaver@comcast.net> (raw)
In-Reply-To: <20040119153613.31921.qmail@web20813.mail.yahoo.com>
References: <20040119153613.31921.qmail@web20813.mail.yahoo.com>

On Monday 19 January 2004 07:36 am, Jeff Eckermann wrote:
> --- Andreas <maps.on@gmx.net> wrote:
> > Hi,
> >
> > I transferred a couple of tables from an Access MDB
> > to Postgres.
> > Among the involved column-types are booleans.
> >
> > I could dump the contend of the Access table to PG
> > via an odbc linked table.
> >
> > In  psql  I can run :
> >     SELECT count(*) FROM my_table WHERE
> > some_boolean;
> > It shows some number as expected.
> >
> > 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.
>
> > How can have booleans that don't break my Access
> > front-end ?
> >
> >
> > cu
> >     Andreas
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the
> > unregister command
> >     (send "unregister YourEmailAddressHere" to
>
> majordomo@postgresql.org)
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
 
The way I have handled this is to avoid check boxes and use a combo box 
instead. I supply the values as True;1 ,False;0 and bind the field to the 
second value of each pair. To make things easier for data entry I hide the 
second column by giving it a width of 0".  In my DSN settings I check bool as 
char and uncheck true as -1. 
-- 
Adrian Klaver	
aklaver@comcast.net



view thread (5+ messages)

Message-ID: <200401200707.21552.aklaver@comcast.net>
Permalink:  ../200401200707.21552.aklaver@comcast.net/
Also on:    postgresql.org/message-id/200401200707.21552.aklaver@comcast.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: aklaver@comcast.net
  Subject: Re: ms-access and booleans ?
  In-Reply-To: <200401200707.21552.aklaver@comcast.net>
  References: <20040119153613.31921.qmail@web20813.mail.yahoo.com> <200401200707.21552.aklaver@comcast.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