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: | 423753AD.6080701@us.michelin.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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...
>
>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
>
>
Attachment | Content-Type | Size |
---|---|---|
greg.campbell.vcf | text/x-vcard | 283 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Sivasakthi d/o Sivagnanam | 2005-03-16 11:16:09 | PostGreSQL |
Previous Message | Elford,Andrew [Ontario] | 2005-03-15 19:57:15 | something is corrupting the data |