Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 1104B63319E for ; Thu, 8 Jul 2010 18:30:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 54273-08 for ; Thu, 8 Jul 2010 21:30:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by mail.postgresql.org (Postfix) with SMTP id 58271632668 for ; Thu, 8 Jul 2010 18:30:04 -0300 (ADT) Received: (qmail 14045 invoked by uid 512); 8 Jul 2010 21:30:00 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 8 Jul 2010 21:30:00 -0000 Received: from unknown (HELO ?192.168.24.51?) (183.76.21.68) by sd.tpf.co.jp with SMTP; 8 Jul 2010 21:30:00 -0000 Message-ID: <4C36433F.5050004@tpf.co.jp> Date: Fri, 09 Jul 2010 06:29:35 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Richard Broersma CC: pgsql-odbc Subject: Re: UPDATE statement value mutation References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.158 tagged_above=-10 required=5 tests=BAYES_05=-0.5, DNS_FROM_RFC_BOGUSMX=1.668, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: * X-Archive-Number: 201007/14 X-Sequence-Number: 10357 Richard Broersma wrote: > I stripped the .bmp attachment since it seems emails with attachments > aren't distributed. > > On Mon, Jul 5, 2010 at 3:24 PM, Richard Broersma > wrote: >> Notice the attached bitmap image. I'm trying to change a value from >> my MS-Access front-end from 0 to 99 using an update-able query. Could you send me the Mylog output? regards, Hiroshi Inoue >> However, when the actual update statement reaches PostgreSQL the value >> of 99 is some how changed to 11. Is this a bug in Access or the ODBC >> driver? >> >> >> >> Postgresql Version: >> version >> ------------------------------------------------------------- >> PostgreSQL 8.4.4, compiled by Visual C++ build 1400, 32-bit >> >> >> ODBC driver version: >> ------------------------------ >> [0.002]Driver Version='08.04.0200,200912260001' linking 1500 static >> Multithread library >> [0.003]Global Options: fetch=100, socket=4096, unknown_sizes=0, >> max_varchar_size=255, max_longvarchar_size=8190 >> [0.003] disable_optimizer=0, ksqo=1, unique_index=1, >> use_declarefetch=0 >> [0.004] text_as_longvarchar=1, >> unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64 >> [0.005] extra_systable_prefixes='dd_', conn_settings='' >> conn_encoding='' >> [0.087] [ PostgreSQL version string = '8.4.4' ] >> [0.087] [ PostgreSQL version number = '8.4' ] >> [0.090]conn=088A4008, query='select oid, typbasetype from pg_type >> where typname = 'lo'' >> [0.099] [ fetched 0 rows ] >> [0.101] [ Large Object oid = -999 ] >> [0.102] [ Client encoding = 'UTF8' (code = 6) ] >> >> >> MS-Access 2002 (10.6771.6858) SP3 >> >> >> Here is the statement that reaches Postgresql. >> >> 2010-07-05 15:21:26 PDTLOG: statement: BEGIN;UPDATE >> "public"."drawings" SET "drawing_type"=11 WHERE "drawingnbr" = >> E'E-4400-60429D-S1' AND "xmin" = 23018 >> 2010-07-05 15:21:26 PDTERROR: insert or update on table "drawings" >> violates foreign key constraint "drawings_drawing_type_fkey" >> 2010-07-05 15:21:26 PDTDETAIL: Key (drawing_type)=(11) is not present >> in table "drawing_types". >> 2010-07-05 15:21:26 PDTSTATEMENT: BEGIN;UPDATE "public"."drawings" >> SET "drawing_type"=11 WHERE "drawingnbr" = E'E-4400-60429D-S1' AND >> "xmin" = 23018 >> 2010-07-05 15:21:26 PDTLOG: statement: ROLLBACK >> >> -- >> Regards, >> Richard Broersma Jr. >> >> Visit the Los Angeles PostgreSQL Users Group (LAPUG) >> http://pugs.postgresql.org/lapug