pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: vincenzo.turturro@regione.toscana.it
To: pgsql-odbc@postgresql.org
Subject: Re: Problem in using PostgreSQL ODBC driver with VBA
Date: Thu, 3 Nov 2016 08:16:43 -0700
Message-ID: <9b9a9fcc-d39b-8451-1e09-48515fa84026@aklaver.com> (raw)
In-Reply-To: <13c604c0-7b6c-b0e0-5b87-ba7187f6a700@regione.toscana.it>
References: <13c604c0-7b6c-b0e0-5b87-ba7187f6a700@regione.toscana.it>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 11/03/2016 08:11 AM, Vincenzo Turturro wrote:
> Good morning
>
> I write in order to obtain clarification (and possibly a solution !)
> about a problem I can't solve.
>
> First of all I will briefly describe the scenario.
>
> I have several applications written in VBA (Visual basic for
> Application) using Microsoft Access both as backend and frontend (data
> are stored in mdb files on a server and applications are stored in mde
> files on the pcs).
>
> I'm committed in reingeneering these applications in order to migrate
> data files to a PostgreSQL database, without changing the frontends
> except that for the connection to the data they manage.
>
> The idea is to connect each frontend to Postgres DB (version 9.5.4)
> using ODBC (version 9.5.4).
>
> In order to run some tests, I migrated data from an mdb file to PG
> tables, defined an ODBC connection and linked the Access frontend to the
> PG database using it.
>
> The problem raises when the application needs to deal with data stored
> in boolean columns.
>
> If SW_UE is the name of a boolean column in a table, when I use a
> statements like this
>
> If SW_UE = -1 Then
>
> Do something
>
> End If
>
> the following error raises:
>
> ERROR: Operator does not exist boolean = integer
>
> I already searched the Internet for a solution and I found some, but
> none solved the problem.
>
> For this reason I decided to write here, hoping in your help and/or some
> hint.

https://odbc.postgresql.org/docs/config.html

Advanced Options 2/2 Dialog Box

True is -1: Represent TRUE as -1 for compatibility with some applications.

While we are on bools:

Advanced Options 1/2 Dialog Box

Data Type Options: affects how some data types are mapped:

Bools as Char: Bools are mapped to SQL_CHAR, otherwise to SQL_BIT.

>
> I thank you in advance for any answer.
>
> Best regards
>
> ------------------------------------------------------------
> Vincenzo Turturro
>
> Regione Toscana
> Direzione generale Governo del territorio
> Sistema Informativo Territoriale ed Ambientale
>
> Via di Novoli 26
> 50127 Firenze
>
> Tel 055 43 83 855
> ------------------------------------------------------------
>


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (16+ messages)  latest in thread

Message-ID: <9b9a9fcc-d39b-8451-1e09-48515fa84026@aklaver.com>
Permalink:  ../9b9a9fcc-d39b-8451-1e09-48515fa84026@aklaver.com/
Also on:    postgresql.org/message-id/9b9a9fcc-d39b-8451-1e09-48515fa84026@aklaver.com

 · 

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: adrian.klaver@aklaver.com, vincenzo.turturro@regione.toscana.it
  Subject: Re: Problem in using PostgreSQL ODBC driver with VBA
  In-Reply-To: <9b9a9fcc-d39b-8451-1e09-48515fa84026@aklaver.com>
  References: <13c604c0-7b6c-b0e0-5b87-ba7187f6a700@regione.toscana.it> <9b9a9fcc-d39b-8451-1e09-48515fa84026@aklaver.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