Skip site navigation (1) Skip section navigation (2)

Re: [Maybe Spam] something is corrupting the data

From: "Greg Campbell" <greg(dot)campbell(at)us(dot)michelin(dot)com>
To: "ElfordAndrew [Ontario]" <Andrew(dot)Elford(at)ec(dot)gc(dot)ca>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [Maybe Spam] something is corrupting the data
Date: 2005-03-15 21:29:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
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... 
>Excel/Access results:
>Any suggestions?
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?

Attachment: greg.campbell.vcf
Description: text/x-vcard (283 bytes)

In response to

pgsql-odbc by date

Next:From: Sivasakthi d/o SivagnanamDate: 2005-03-16 11:16:09
Subject: PostGreSQL
Previous:From: Elford,Andrew [Ontario]Date: 2005-03-15 19:57:15
Subject: something is corrupting the data

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group