From FredP@abag.ca.gov Thu Feb 20 17:27:23 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9CF3B47592C for ; Thu, 20 Feb 2003 12:27:23 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 44120-01 for ; Thu, 20 Feb 2003 12:27:12 -0500 (EST) Received: from iserver.abag.ca.gov (iserver.abag.ca.gov [198.31.87.3]) by postgresql.org (Postfix) with ESMTP id 34EF1475E20 for ; Thu, 20 Feb 2003 12:18:25 -0500 (EST) Received: from groupwise.abag.ca.gov (groupwise.abag.ca.gov [198.31.87.26]) by iserver.abag.ca.gov (8.12.4/8.12.4) with SMTP id h1KHIUo3019865 for ; Thu, 20 Feb 2003 09:18:30 -0800 (PST) Received: from D01-Message_Server by groupwise.abag.ca.gov with Novell_GroupWise; Thu, 20 Feb 2003 09:18:29 -0800 Message-Id: X-Mailer: Novell GroupWise Internet Agent 5.5.6.1 Date: Thu, 20 Feb 2003 09:17:56 -0800 From: "Fred Parkinson" To: Subject: Only fails when logging is off Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=_FBA49DF5.8EEF8E58" X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/93 X-Sequence-Number: 2711 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=_FBA49DF5.8EEF8E58 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Here is a problem that disappears when logging is on: Attempting to issue the following SQL query from Access '97 against a postg= res database: SELECT tcompanies.company_id, CStr([tcompanies].[login_id]) & ": " & [tcomp= anies].[name] AS Expr1, tcompanies.name FROM tcompanies WHERE tcompanies.active=20 ORDER BY tcompanies.name; column 'active' is boolean 2 messages ppear in succession 1. ODBC Call failed 2. ERROR: Unable to identify an operator "=3D" for types "boolean" and "int= eger" You will have to retype this query using an explicit cast (#7) Any ideas? Fred Parkinson Association of Bay Area Governments --=_FBA49DF5.8EEF8E58 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Here is a problem that disappears when logging is=20 on:
Attempting to issue the following SQL query from Access= '97=20 against a postgres database:
 
SELECT tcompanies.company_id, CStr([tcompanies].[login_= id])=20 & ": " & [tcompanies].[name] AS Expr1, tcompanies.name
FROM=20 tcompanies
WHERE tcompanies.active
ORDER BY tcompanies.name;
<= /DIV>
 
column 'active' is boolean
 
2 messages ppear in succession
1. ODBC Call failed
2. ERROR: Unable to identify an operator "=3D" for type= s=20 "boolean" and "integer"
   You will have to retype this query using a= n=20 explicit cast (#7)
 
Any ideas?
 
Fred Parkinson
Association of Bay Area Governments
= --=_FBA49DF5.8EEF8E58-- From jeff_eckermann@yahoo.com Thu Feb 20 20:45:07 2003 X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3301C475C60 for ; Thu, 20 Feb 2003 15:45:07 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 06693-06 for ; Thu, 20 Feb 2003 15:44:56 -0500 (EST) Received: from web20805.mail.yahoo.com (web20805.mail.yahoo.com [216.136.226.194]) by postgresql.org (Postfix) with SMTP id 5D60A475CA9 for ; Thu, 20 Feb 2003 15:34:59 -0500 (EST) Message-ID: <20030220203500.33841.qmail@web20805.mail.yahoo.com> Received: from [68.15.168.98] by web20805.mail.yahoo.com via HTTP; Thu, 20 Feb 2003 12:34:59 PST Date: Thu, 20 Feb 2003 12:34:59 -0800 (PST) From: Jeff Eckermann Subject: Re: Only fails when logging is off To: Fred Parkinson , pgsql-odbc@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/95 X-Sequence-Number: 2713 --- Fred Parkinson wrote: > Here is a problem that disappears when logging is > on: What version of PostgreSQL is this? > 2. ERROR: Unable to identify an operator "=" for > types "boolean" and "integer" > You will have to retype this query using an > explicit cast (#7) > Sounds like an old problem. Try running the following code in in PostgreSQL: CREATE FUNCTION MsAccessBool (bool, int4) RETURNS BOOL AS ' BEGIN IF $1 ISNULL THEN RETURN NULL; END IF; IF $1 IS TRUE THEN IF $2 <> 0 THEN RETURN TRUE; END IF; ELSE IF $2 = 0 THEN RETURN TRUE; END IF; END IF; RETURN FALSE; END; ' LANGUAGE 'plpgsql'; CREATE OPERATOR = ( LEFTARG = BOOL, RIGHTARG = INT4, PROCEDURE = MsAccessBool, COMMUTATOR = '=', NEGATOR = '<>', RESTRICT = EQSEL, JOIN = EQJOINSEL ); If this doesn't help you, please post your ODBC driver settings. I assume these are boolean fields in PostgreSQL: they should show as "yes/no" in Access. If they do not, try relinking your tables after running the above code. __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/