Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4onJ-0005qn-68 for pgsql-odbc@arkaria.postgresql.org; Thu, 10 Nov 2016 12:49:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c4onI-0000QV-Ot for pgsql-odbc@arkaria.postgresql.org; Thu, 10 Nov 2016 12:49:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c4omw-0008St-Mf for pgsql-odbc@postgresql.org; Thu, 10 Nov 2016 12:49:06 +0000 Received: from serveurmail01.codata.be ([82.146.123.190]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4omt-0001kI-24 for pgsql-odbc@postgresql.org; Thu, 10 Nov 2016 12:49:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by serveurmail01.codata.be (Postfix) with ESMTP id 144C09018B for ; Thu, 10 Nov 2016 13:49:02 +0100 (CET) X-Virus-Scanned: amavisd-new at serveurmail01.codata.be Received: from serveurmail01.codata.be ([127.0.0.1]) by localhost (serveurmail01.codata.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZW5VuooYTGvh for ; Thu, 10 Nov 2016 13:49:00 +0100 (CET) Received: from [10.0.0.100] (38-179-112-217.fix.adsl.belcenter.be [217.112.179.38]) by serveurmail01.codata.be (Postfix) with ESMTPSA id 140ED90186 for ; Thu, 10 Nov 2016 13:49:00 +0100 (CET) Subject: Re: Problem in using PostgreSQL ODBC driver with VBA To: pgsql-odbc@postgresql.org References: <13c604c0-7b6c-b0e0-5b87-ba7187f6a700@regione.toscana.it> <9b9a9fcc-d39b-8451-1e09-48515fa84026@aklaver.com> <581AFB17020000A7000370D0@gwia1.abag.ca.gov> <5f73bd25-c372-6b91-1961-88d3656345a7@regione.toscana.it> <58203522020000A70003717F@gwia1.abag.ca.gov> <77c91b86-9721-7125-21bb-55e811513be1@regione.toscana.it> Reply-To: arnaud.listes@codata.eu From: "Arnaud L." Message-ID: <3060c627-b416-a491-7189-234cd72abad2@codata.eu> Date: Thu, 10 Nov 2016 13:48:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <77c91b86-9721-7125-21bb-55e811513be1@regione.toscana.it> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org Le 10/11/2016 à 10:46, Vincenzo Turturro a écrit : > Il 10/11/2016 09:42, Arnaud L. ha scritto: >> I've been using the solution from this post for a long time and never >> had any problem : >> http://www.postgresonline.com/journal/index.php?url=archives/24-Using-MS-Access-with-PostgreSQL.html >> >> See the section "dealing with boolean". >> I like the fact that function is written in pure SQL. >> > > I have tried the solution you suggest, but without success. > I used the SQL statements provided in the post, but the problem wasn't > solved. > Maybe I missed something that is not mentioned in the post because it's > obvious for PG users ? > Keep in mind I'm a newby in PG ! I'm no PG guru either, so the only "obvious" thing I can think of is that the operators and functions you are creating are not in your search path when you connect through ODBC. So I guess the best for you would be to create them in the public schema, and to check in your ODBC connection that the public schema is in your search path. (a simple "show search_path;" query) Then through ODBC, what do you get when you try to directly call inttobool() or notinttobool ? Do these functions exist and work as expected ? i.e. select inttobool(-1,true); And what about a direct call to the operators ? i.e. what do you have when you call select 1::int4 <> false::boolean ; and what about the schema-qualified version ? select 1::int4 operator(public.<>) false::boolean; Regards -- Arnaud -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc