Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWCxI-00033r-60 for pgsql-odbc@arkaria.postgresql.org; Thu, 18 Feb 2016 01:00:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWCxH-0000Vl-6N for pgsql-odbc@arkaria.postgresql.org; Thu, 18 Feb 2016 01:00:27 +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) (envelope-from ) id 1aWCwt-0008Sy-05 for pgsql-odbc@postgresql.org; Thu, 18 Feb 2016 01:00:03 +0000 Received: from [66.111.4.27] (helo=out3-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWCwl-00082h-Qh for pgsql-odbc@postgresql.org; Thu, 18 Feb 2016 01:00:02 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EF01320A26 for ; Wed, 17 Feb 2016 19:59:33 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 17 Feb 2016 19:59:33 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Z1MuDxhkVEjiXTP+0VDb9JZerCw=; b=kFrPo/ HMQ6mCD9NidZabDROA9a/g/r4BpIXp8F5t3SOU8VQygwPoI4Du8BfatsSRDztJIN Ztfpdfs9KUjMSMTDhibJI52QMbQqSKSX6e62JHvKUcN3fqxvNYE3pqswALKx0qi9 xGAmamw5I4IuR1BM1r/3Tci2MxokALTRBKOEg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Z1MuDxhkVEjiXTP +0VDb9JZerCw=; b=CsZtWyKkCPu3q3FujYKcBpdGjTkrD8lC1d4luMEw98tNxSs avOWAsMI6w9XEJbCoGwvtGPvoExIXmzetXeEeFOrrgRsDYfqsJ/deF2nTfwi8m7V 0Ochw1evHDVvGkGmGiFmTNZRYpRv5Cz9Cj2QL7k7TvR82CzZ6ozk3jgnFDc0= X-Sasl-enc: TArBFQ/NArjJAVQUtH34CxW3V6iDiPDXyBoiDVrswM4y 1455757173 Received: from [192.168.1.2] (174-21-70-246.tukw.qwest.net [174.21.70.246]) by mail.messagingengine.com (Postfix) with ESMTPA id 5AA32C0001A; Wed, 17 Feb 2016 19:59:33 -0500 (EST) Subject: Re: Issue with Money field using ODBC to Access database To: John Van De Giessen 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> Cc: Neville Cook , pgsql-odbc@postgresql.org From: Adrian Klaver Message-ID: <56C5172F.8040900@aklaver.com> Date: Wed, 17 Feb 2016 16:58:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <000f01d169da$bed51e40$3c7f5ac0$@internode.on.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.27 (deferred) 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 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