X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BF89C566D8 for ; Tue, 15 Mar 2005 21:31:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30574-06 for ; Tue, 15 Mar 2005 21:31:47 +0000 (GMT) Received: from gk-us2.michelin.com (gk-us2.michelin.com [156.65.14.19]) by svr1.postgresql.org (Postfix) with ESMTP id A6C6F567BD for ; Tue, 15 Mar 2005 21:29:21 +0000 (GMT) Received: from ONCMH1.onc.michelin.com (unverified) by gk-us2.michelin.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Tue, 15 Mar 2005 16:21:43 -0500 Received: from oncmtap1.onc.michelin.com by oncmh1.onc.michelin.com with ESMTP for pgsql-odbc@postgresql.org; Tue, 15 Mar 2005 16:23:44 -0500 Received: from oncems01.onc.michelin.com ([156.65.125.150]) by oncmtap1.onc.michelin.com (Netscape Messaging Server 4.15) with ESMTP id IDEX0W00.2O5 for ; Tue, 15 Mar 2005 16:29:20 -0500 Received: from us.michelin.com (unverified) by oncems01.onc.michelin.com (Content Technologies SMTPRS 4.2.5) with ESMTP id ; Tue, 15 Mar 2005 16:29:19 -0500 Message-Id: <423753AD.6080701@us.michelin.com> Date: Tue, 15 Mar 2005 16:29:17 -0500 From: "Greg Campbell" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "ElfordAndrew [Ontario]" Cc: pgsql-odbc@postgresql.org Subject: Re: [Maybe Spam] something is corrupting the data References: <9B09D75DF5B3494BA06E6FE478CE9CC17B5E16@mgtserver3.ontario.int.ec.gc.ca> In-Reply-To: <9B09D75DF5B3494BA06E6FE478CE9CC17B5E16@mgtserver3.ontario.int.ec.gc.ca> Content-Type: multipart/mixed; boundary="------------030504090405020503010409" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.033 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/60 X-Sequence-Number: 5078 This is a multi-part message in MIME format. --------------030504090405020503010409 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Don't know that I would call that corruption as much as a difference in precision past about the 5th decimal -- of course all floating point numbers are actually stored as some form like 0.2546E+2. If I were using Access, I'd link to the tables and check the data type Access thinks it has,..single (4 byte floating point) or double (8 byte floating point). If pressed, I would then turn on ODBC debugging, and run some queries to see the exact data passed back and forth between hither and yon (client and server). If pressed still I would explore the arcane world of floating point data storage and representation (G type, E types, and F types) that I haven't paid much attention to since I programmed in Fortran. Of course, in the real world, since I don't work in a bank or NASA, I try not to get pressed that far. Elford,Andrew [Ontario] wrote: >Server (on Gentoo linux): postgresql-7.4.7 >Windows client: psqlodbc-07.03.0200 > > >I get perfect results when I use pgAdmin or directly on the console, but >when I use Excel or Access through ODBC, I get corrupted numbers (using >the same SQL command). The data corruption is consistent (same wrong >number every time). The data type for all fields is float4. I've tried >newer snapshot versions of psqlodbc and different clients, no luck. >This also occurred with postgresql 7.3 on our old RH box... > >Correct: >2.5246,2.1749,229.04,30.148,0.92686,41.7 > >Excel/Access results: >2.5246,2.1749001,229.03999,30.148001,0.92685997,41.700001 > >Any suggestions? > >---------------------------(end of broadcast)--------------------------- >TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > > --------------030504090405020503010409 Content-Type: text/x-vcard; charset=utf8; name="greg.campbell.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="greg.campbell.vcf" begin:vcard fn:Greg Campbell n:Campbell;Greg org:Michelin North America;ENG-IT adr;dom:;;2420 Two Notch Road;Lexington;SC;29071 email;internet:greg.campbell@us.michelin.com title:Systems Engineer tel;work:803-951-5561 tel;fax:803-951-5531 x-mozilla-html:FALSE version:2.1 end:vcard --------------030504090405020503010409--