Received: from u1.abs.net (root@u1.abs.net [207.114.0.131]) by hub.org (8.8.8/8.7.5) with ESMTP id NAA12336 for ; Wed, 2 Sep 1998 13:21:26 -0400 (EDT) Received: from insightdist.com (nobody@localhost) by u1.abs.net (8.9.0/8.9.0) with UUCP id NAA04284 for pgsql-interfaces@postgreSQL.org; Wed, 2 Sep 1998 13:00:44 -0400 (EDT) X-Authentication-Warning: u1.abs.net: nobody set sender to insightdist.com!daveh using -f Received: from ceodev by insightdist.com (AIX 3.2/UCB 5.64/4.03) id AA46981; Wed, 2 Sep 1998 12:55:27 -0400 Received: from daveh by ceodev (AIX 4.1/UCB 5.64/4.03) id AA21594; Wed, 2 Sep 1998 12:55:27 -0400 Message-Id: <35ED7971.F5639931@insightdist.com> Date: Wed, 02 Sep 1998 12:59:29 -0400 From: David Hartwig Organization: Insight Distribution Systems X-Mailer: Mozilla 4.05 [en] (Win95; I) Mime-Version: 1.0 To: leif@danmos.dk Cc: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Postgres ODBC and SQL_BIT References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit leif@danmos.dk wrote: > Hi all, > > Excuse me for a newbie question. > > I am trying to make a PostgreSQL database that must be compatible with > an existing M$Access database. I have some trouble figuring out what > postgres type to use for SQL_BIT. I believe the Access type is called Yes/No > (and is used for checkboxes.) I am also using this in a C/C++ program using > ODBC. My C/C++ program correctly connects to an Access database with these > fields, and I have tried both 'bool' and 'char' as types in the Postgres > database, but none of them works. Is there a standard type for this or do > I have to make my own (and if so, how?) ? MS Access will not take any ODBC SQL data type and translate it into a check box. Other tool may do this but not MS Access. Access only supports check boxes on Access databases. As for what Access it will do - The psqlodbc driver as options to treat postgresql bools as SQL_CHAR (t/f) or or SQL_BIT. MS Access displays SQL_BIT as -1/0. If you are not using the psqlodbc driver, you are on your own.