From: Amir Zicherman <amir.zicherman@gmail.com>
To: Peter van Heck <usenet@heckwork.nl>
Cc: pgsql-odbc@postgresql.org
Subject: Re: ERROR: invalid input syntax for type boolean: "-"(#7)
Date: Fri, 1 Oct 2004 13:37:46 -0400
Message-ID: <27a5b7d104100110371b2481ec@mail.gmail.com> (raw)
In-Reply-To: <415a157f$0$402$e4fe514c@dreader5.news.xs4all.nl>
References: <415a157f$0$402$e4fe514c@dreader5.news.xs4all.nl>
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 <usenet@heckwork.nl> 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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: amir.zicherman@gmail.com, usenet@heckwork.nl
Subject: Re: ERROR: invalid input syntax for type boolean: "-"(#7)
In-Reply-To: <27a5b7d104100110371b2481ec@mail.gmail.com>
References: <415a157f$0$402$e4fe514c@dreader5.news.xs4all.nl> <27a5b7d104100110371b2481ec@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox