X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7FF82D1B492 for ; Tue, 20 Jan 2004 00:14:17 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 84835-01 for ; Mon, 19 Jan 2004 20:13:49 -0400 (AST) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id 8AB03D1B456 for ; Mon, 19 Jan 2004 20:13:45 -0400 (AST) Received: (qmail 19435 invoked by uid 65534); 20 Jan 2004 00:13:31 -0000 Received: from p508BF7F5.dip.t-dialin.net (EHLO gmx.net) (80.139.247.245) by mail.gmx.net (mp014) with SMTP; 20 Jan 2004 01:13:31 +0100 X-Authenticated: #14269776 Message-ID: <400C7357.7090704@gmx.net> Date: Tue, 20 Jan 2004 01:16:23 +0100 From: Andreas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.6) Gecko/20040113 X-Accept-Language: de-de, en-us, en MIME-Version: 1.0 To: Jeff Eckermann Cc: pgsql-odbc@postgresql.org Subject: Re: ms-access and booleans ? References: <20040119153613.31921.qmail@web20813.mail.yahoo.com> In-Reply-To: <20040119153613.31921.qmail@web20813.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/56 X-Sequence-Number: 3685 Jeff Eckermann wrote: >--- Andreas 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-}