X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A29F932A1CB for ; Fri, 1 Oct 2004 18:37:55 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87705-07 for ; Fri, 1 Oct 2004 17:37:48 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by svr1.postgresql.org (Postfix) with ESMTP id EA70132A1AC for ; Fri, 1 Oct 2004 18:37:47 +0100 (BST) Received: by mproxy.gmail.com with SMTP id 74so34577rnk for ; Fri, 01 Oct 2004 10:37:46 -0700 (PDT) Received: by 10.38.92.61 with SMTP id p61mr2231757rnb; Fri, 01 Oct 2004 10:37:46 -0700 (PDT) Received: by 10.38.88.46 with HTTP; Fri, 1 Oct 2004 10:37:46 -0700 (PDT) Message-ID: <27a5b7d104100110371b2481ec@mail.gmail.com> Date: Fri, 1 Oct 2004 13:37:46 -0400 From: Amir Zicherman Reply-To: Amir Zicherman To: Peter van Heck Subject: Re: ERROR: invalid input syntax for type boolean: "-"(#7) Cc: pgsql-odbc@postgresql.org In-Reply-To: <415a157f$0$402$e4fe514c@dreader5.news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <415a157f$0$402$e4fe514c@dreader5.news.xs4all.nl> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/10 X-Sequence-Number: 4485 i'm not too familiar with access, but in my c# code i do something like this to convert the 1s to bools. i'm not sure if this is the best way to handle this. it's kind of ugly: ((string)tableRow["boolCol"]=="1" ? true : false) also, I don't know if this helps but you can change the -1s to 1s if you want. if you're using a DSN to connect to your database, then go to Data Sources in Admin Tools and if you open up your DSN, you can configure it by clicking on "datasource". the second page will have an option "True as -1". if you uncheck it then you'll get 1 for true. amir On Wed, 29 Sep 2004 03:52:51 +0200, Peter van Heck wrote: > I get this error with an ms-access front-end boolean type field > where access produces "-1" and Postgresql's bool field does not > accept this. > > Im using Postgres 7.4.5, Access 2002, mdac 2.8, psqlodbc-07_03_0200. > > Is there a proper work around? > > Peter > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >