Peter Koczan <pjkoc...@gmail.com> writes: > On Wed, Aug 4, 2010 at 4:40 PM, Richard Broersma > <richard.broer...@gmail.com> wrote: (...) >> I know that there is a setting in the ODBC driver for true = -1 but it >> doesn't work well. I also remember that filters didn't work on mapped >> boolean columns. > > Yep, that's the stumbling block we're running into. ODBC and these > fields' assumptions of true/false are at odds. I'm trying a few other > things with casts in the meantime to see if they'll work.
I'm still supporting a legacy Access front-end that I converted over to PostgreSQL a few years back, and did have to do some work for boolean fields. It's been a while, but I believe I: * Disabled the ODBC driver option "Bools as Char" * Did not enable the "True=-1" option in the driver * Ensured that no boolean fields were nullable (otherwise in a query that Access uses to determine if a record changed prior to posting its own changes the NULL value would become False by the time it reached Access, and Access would then fail to post changes believing the row had already been edited). * Added a series of functions for integer/boolean comparisons, so filters and queries would work. Outside of boolean support, I also needed to add a "lo" domain to work with some fields across the interface (I think text fields that were memo on the Access side, but it's been a while). I think this page was the most helpful overall in identifying the most stuff in one place while I was getting things set up. My boolean/integer comparison functions are also from this page: http://www.postgresonline.com/journal/archives/24-Using-MS-Access-with-PostgreSQL.html Note that it recommends enabling the True=-1 option in the driver, but I don't appear to be running with that, so either it didn't make a difference, or it caused me problems, I can't be remember. But with the above, I'm not having any problems with Access working against the database, including using the boolean fields in filters or queries. -- David -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql