From: | "Francois Cote" <francoisco(at)aei(dot)ca> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Problem with data storage |
Date: | 2008-04-04 19:41:35 |
Message-ID: | op.t83qblr27xd6k3@fsider2.gateway.2wire.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi,
I'm still doing test with PostgreSQL with C++ Builder using MicroOLAP DAC
and one big problem I have is with numerical data type.
Suppose the following table:
CREATE TABLE "TestNumbers"
(
"TestInteger" integer,
"TestReal" real,
"TestMoney" money,
"TestDouble" double precision,
"TestNumeric" numeric(20,2)
);
Now, after adding a record with the value 22443018 for each fields I
finally have the following values:
TestInteger: 22443018
TestReal: 22443000
TestMoney: {get a read error at 0x00000000, probably microOLAP DAC
related}
TestDouble: {empty/no value displayed}
TestNumeric {empty/no value displayed}
Using pgAdmin III, I see the same values.
Now Inserting data in the table using pgAdmin III:
INSERT INTO "TestNumbers"(
"TestInteger", "TestReal", "TestMoney", "TestDouble",
"TestNumeric")
VALUES ('22443018', '22443018', '22443018', '22443018', '22443018');
The results are in pgAdmin are:
TestInteger: 22443018
TestReal: 2.2443e+007
TestMoney: -$20,506,654.96
TestDouble: 22443018
TestNumeric: 22443018.00
And looking at this record from C++ Builder, I have the following values:
TestInteger: 22443018
TestReal: 22443000
TestMoney: -$20,506,654.96
TestDouble: {empty/no value displayed}
TestNumeric: {empty/no value displayed}
I have made the same test with a simple Paradox table, and all values are
displayed correctly.
Does anybody knows why the rounding occurs, why the negative value and why
the blank value?
Thanks a lot
Francois
From | Date | Subject | |
---|---|---|---|
Next Message | John Koller | 2008-04-05 03:11:15 | Re: Six processes and why does the service want access to the internet? |
Previous Message | Sean Davis | 2008-04-03 15:00:25 | Re: create database from text file, to delete columns |