pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
To: Fred Parkinson <FredP@abag.ca.gov>
To: vincenzo.turturro@regione.toscana.it
Cc: pgsql-odbc@postgresql.org
Subject: Re: Problem in using PostgreSQL ODBC driver with VBA
Date: Wed, 9 Nov 2016 17:15:30 +0900
Message-ID: <5822DB22.10106@dream.email.ne.jp> (raw)
In-Reply-To: <58203522020000A70003717F@gwia1.abag.ca.gov>
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

Hi Vincenzo, Fred,

Could you please try the drivers 9.5.0406 at
     http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/
?

regards,
Hiroshi Inoue

On 2016/11/08 1:02, Fred Parkinson wrote:
> One thing I now remember from when this issue first appeared is that 
> there was another possible solution.
> When trying to use FALSE or TRUE in an Access query that uses a 
> postgres boolean, I would get the error:
> ODBC call failed: ERROR: operator does not exist: boolean = integer;...
>
> Apparently you can write an operator and add it to the postgres 
> server, an operator that will perform the comparison between a boolean 
> and an integer.
> The intern I was working with at the time tried once to write that 
> operator, but when his attempt failed at the first try, we went with 
> the kludge because we were in a hurry and didn't want to spend the 
> time debugging his code.
>
> I am not sure but I think the operator was written in PHP. In any 
> case, that might be a fruitful line of inquery given that you can't 
> rewrite a major application to use the kludge I describe below.
>
> Hope this helps!
>
> Fred Parkinson
> Application Programmer
> Association of Bay Area Governments
> 415-820-7931
>
> >>> Vincenzo Turturro <vincenzo.turturro@regione.toscana.it> 11/4/2016 4:52 AM >>>
> >
> Il 03/11/2016 16:53, Fred Parkinson ha scritto:
>> Been there done that.
>>
>> I have been using Access with PostgreSQL through ODBC for about 20 
>> years, and boolean is essentially the biggest issue.
>>
>> I create 2 odbc connections to a postgres database that has tables 
>> with boolean fields
>> connection 1 uses an ODBC file DSN with: PAGE 1: bools as char is 
>> checked; page 2: true is -1 is unchecked
>> connection 2 uses an ODBC file DSN with: PAGE 1: bools as char is 
>> UNchecked; page 2: true is -1 is checked
>>
>> My access database then has 2 connections to the table in question. I 
>> sufix the connection 2 table name (in access) as: 
>> public_my_table_bolasneg1
>>
>> The odbc connection using the connection 1 file DSN to this table can 
>> be used in queries with a WHERE condition of "0" or "1" to limit 
>> records based on the boolean field.
>> The odbc connection using the connection 2 file DSN to this table can 
>> be used to bind the MS Access boolean check box to this field and the 
>> user can use the check box natively to update this field.
>>
>> Yes this is a kludge but it has worked for 20 years.
>>
>> in your example below I would use the connection 1 table and the 
>> statement would be:
>> If SW_UE = "1" Then
>> do something
>> end if
>
> Thank you for your answer, but your suggestion is not affordable in my 
> situation.
> I'm not writing a new application: I'm reingeneering an existing 
> application (eventually the first of a set of ten) and I merely can't 
> browse the thousands of lines of vba code in order to change all the 
> "If" statements.
> Nor I can use the automatic "search and replace" function because the 
> if statements can be of the type
> If BoolField = BoolVar then
> do something
> end if
> Nor I can change the type of all the boolean variables to Char.
> And I simply don't want even to think about the nightmare to dig all 
> the SQL statements, which often are built in VBA "on the fly" 
> according to user's choices ...
> Do you think I should evaluate another database, more "Access friendly" ?
> Best regards

view thread (16+ messages)  latest in thread

Message-ID: <5822DB22.10106@dream.email.ne.jp>
Permalink:  ../5822DB22.10106@dream.email.ne.jp/
Also on:    postgresql.org/message-id/5822DB22.10106@dream.email.ne.jp

 · 

reply

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: h-inoue@dream.email.ne.jp, FredP@abag.ca.gov, vincenzo.turturro@regione.toscana.it
  Subject: Re: Problem in using PostgreSQL ODBC driver with VBA
  In-Reply-To: <5822DB22.10106@dream.email.ne.jp>
  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> <5822DB22.10106@dream.email.ne.jp>

* 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