From: | "Olaf Mittelstaedt" <mstaedt(at)va-sigi(dot)va(dot)fh-ulm(dot)de> |
---|---|
To: | interfaces postgres <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: NEW ODBC DRIVER |
Date: | 1998-05-12 08:50:22 |
Message-ID: | 199805120751.JAA24248@gate.va.fh-ulm.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
> > At 08.35 11/05/98 -0400, Byron Nikolaidis wrote:
> > >As for the BOOL problem, I tried to return it as a SQL_BOOL, but Access
> > >displayed it as 0=FALSE, and (-1)=TRUE. Why does TRUE translate to a -1, I
> > >have no idea. But for that reason, I chose to make it a character type
> > >instead.
> >
>
> If I have my Postgres bool column, and it contains a NULL, Access automatically
> displays it as "0". Then if I try to update the record, it uses the "0" in the
> where clause. Well guess what, no records are updated because the "0" doesn't
> match the NULL in the record, and you get this ugly message about a user
> conflict!
>
> When BOOLS are handled as character data, this doesnt happen of course.
>
> Anybody got any ideas about this?
When migrating tables from Access 2.0 to an SQL Server (Informix,
Interbase or PostgreSQL) I'm using INT4 to simulate boolean values
(0=False, -1=True), all Access queries using boolean columns will
work as before with native Access tables:
"... WHERE (b=True);" selects all rows with column b == -1
"... WHERE (b=False);" selects all rows with column b == 0
"... WHERE (b is Null);" selects all rows with column b == NULL
Of course you can't issue queries like "...where (b = true);" on the
UNIX side.
Regards,
Olaf
--
Olaf Mittelstaedt - IuK - mittelstaedt(at)fh-ulm(dot)de
Fachhochschule Ulm Prittwitzstr. 10 89075 Ulm
Tel.: +49 (0)731-502-8220 Fax: -8270
Tertium non datur.
From | Date | Subject | |
---|---|---|---|
Next Message | Jose' Soares Da Silva | 1998-05-12 10:07:53 | Re: [HACKERS] money or dollar type |
Previous Message | Andreas Zeugswetter | 1998-05-12 08:46:05 | AW: [HACKERS] Re: [QUESTIONS] money or dollar type |
From | Date | Subject | |
---|---|---|---|
Next Message | Ewan Mellor | 1998-05-12 10:49:57 | MS Access & PsqlODBC: Invalid field name 'name' |
Previous Message | Tony Cowderoy | 1998-05-12 08:01:57 | Re: [INTERFACES] Group/Order by not in target - Was [NEW ODBC DRIVER] |