Re: Domains, casts, and MS Access

Поиск
Список
Период
Сортировка
От David Bolen
Тема Re: Domains, casts, and MS Access
Дата
Msg-id m2y6ckoiky.fsf@valheru.db3l.homeip.net
обсуждение исходный текст
Ответ на Domains, casts, and MS Access  (Peter Koczan <pjkoczan@gmail.com>)
Список pgsql-sql
Peter Koczan <pjkoczan@gmail.com> writes:

> On Wed, Aug 4, 2010 at 4:40 PM, Richard Broersma
> <richard.broersma@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
noboolean fields were nullable (otherwise in a query   that Access uses to determine if a record changed prior to
postingits   own changes the NULL value would become False by the time it reached   Access, and Access would then fail
topost 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



В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Broersma
Дата:
Сообщение: Re: Domains, casts, and MS Access
Следующее
От: "Marc Mamin"
Дата:
Сообщение: Re: workaround for missing ROWNUM feature with the help of GUC variables