From: Adrian Klaver <adrian.klaver@aklaver.com>
To: John Van De Giessen <jvdg@internode.on.net>
Cc: Neville Cook <ncook@internode.on.net>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Issue with Money field using ODBC to Access database
Date: Wed, 17 Feb 2016 16:58:23 -0800
Message-ID: <56C5172F.8040900@aklaver.com> (raw)
In-Reply-To: <000f01d169da$bed51e40$3c7f5ac0$@internode.on.net>
References: <001501d16521$740250d0$5c06f270$@internode.on.net>
<56C33531.4040303@aklaver.com>
<001b01d16935$2a861af0$7f9250d0$@internode.on.net>
<56C49123.6000900@aklaver.com>
<000f01d169da$bed51e40$3c7f5ac0$@internode.on.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
On 02/17/2016 03:27 PM, John Van De Giessen wrote:
> Hi Adrian,
>
> Thank you very much for your time and effort in looking at this. I will send
> this on to the list as you suggest.
>
> My concern is that using the ODBC with Access 97 gives us very little
> control of what can actually happen.
The above is part of the problem, Access 97 is 19 years old and falling
behind every day. My guess is you will start seeing more
incompatibilities crop up as you go forward.
> We are not given a choice on how data types are mapped from PostgreSQL to
> Access. A money field in PG will become a double field when linked in Access
> 97 and we have no way that I know of the make this any different.
> I am also not aware of any way that we can structure a query in access that
> will satisfy the requirement of item 12. that you have noted below. I do not
> believe that it is possible in Access to do this using the ODBC.
>
> That leaves us with one of two conclusions. Either the changes in psqlODBC
> 09.05.0100 that break this are intentional and therefore the PG ODBC can no
> longer be used with Access if money fields are used, or there is a bug in
> the ODBC and needs to be fixed.
>
> Our other option is to avoid using the money data type altogether and
> instead use the Numeric data type.
> Numeric(15,4) maps in Access as a double but doesn't cause the same error
> that using the money field does. However, when using this you get a "Two
> users are attempting to changes the data at the same time" error when trying
> to update data in a recordset query. (Note: This error also occurs in the
> older versions of the ODBC driver.)
Inherit to casting from double precision to numeric and back. There is
loss of precision and Access sees this as an update, where the value it
calculates for the update field does not match exactly the value stored
in the database and returned to it.
> Numeric(18,4) maps as Text(18) in Access and seems to work just fine but it
> would be nicer to be mapped at least to a number field of some sort. However
> at the moment this seems to be our only option.
>
> If anyone knows of a way to make a PG "Money" or "Numeric(x,x)" data type
> map in Access to its "Currency" data type then we would be very pleased to
> know how.
If you are going to stay with Access 97 I'm thinking you will need to
stay with older versions of the ODBC driver.
>
> Again, thank you very much.
>
> Regards,
>
> John Van De Giessen
> Thyme Software
>
--
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
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, jvdg@internode.on.net, ncook@internode.on.net
Subject: Re: Issue with Money field using ODBC to Access database
In-Reply-To: <56C5172F.8040900@aklaver.com>
References: <001501d16521$740250d0$5c06f270$@internode.on.net> <56C33531.4040303@aklaver.com> <001b01d16935$2a861af0$7f9250d0$@internode.on.net> <56C49123.6000900@aklaver.com> <000f01d169da$bed51e40$3c7f5ac0$@internode.on.net> <56C5172F.8040900@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