Invalid input syntax for type numeric
Posted: Mon 13 Apr 2009 12:15
Hello,
I have this problem. I have contacted pgdac*devart*com but no answer for the moment....
It is very urgent, because a I have stuck with this..
===================
DROP DOMAIN IF EXISTS otrotpc CASCADE;
CREATE DOMAIN otrotpc AS numeric(8,5)
NULL;
DROP TABLE IF EXISTS test_otrotpc CASCADE;
CREATE TABLE test_otrotpc
( empresa numeric(1),
tpcdto sctest.otrotpc,
CONSTRAINT pk_otrotpc
PRIMARY KEY(empresa)
);
INSERT INTO test_otrotpc VALUES (1,23.48178);
SELECT * FROM test_otrotpc;
===================
Then, put a Win32 VCL form with:
- PgConnection
- PgTable1 (pointing to test_otrotpc)
- PgDataSource1
Drop a DbGrid and a DbNavigator.
And try to insert, on a new line, the values:
empresa = 2
tpcdto = 23,48178 (comma = decimal point)
Then you get a:
EPgError
Invalid input syntax for type numeric: "23,48178"
SQLState: 22P02
procedureName: set_var_from_str
LineNumber: 3023
Position: 0
Severity: Error
I have tried to insert same values with:
* SQL Manager 2007 lite for PostgreSQL
* PgAdmin III
* PostgresDAC 2.4.1 (with same dbgrid/dbnavigator form)
All of them are ok.
It seeems a bug. Somebody can check if it is failing too.
Thanks....
I have this problem. I have contacted pgdac*devart*com but no answer for the moment....
It is very urgent, because a I have stuck with this..
===================
DROP DOMAIN IF EXISTS otrotpc CASCADE;
CREATE DOMAIN otrotpc AS numeric(8,5)
NULL;
DROP TABLE IF EXISTS test_otrotpc CASCADE;
CREATE TABLE test_otrotpc
( empresa numeric(1),
tpcdto sctest.otrotpc,
CONSTRAINT pk_otrotpc
PRIMARY KEY(empresa)
);
INSERT INTO test_otrotpc VALUES (1,23.48178);
SELECT * FROM test_otrotpc;
===================
Then, put a Win32 VCL form with:
- PgConnection
- PgTable1 (pointing to test_otrotpc)
- PgDataSource1
Drop a DbGrid and a DbNavigator.
And try to insert, on a new line, the values:
empresa = 2
tpcdto = 23,48178 (comma = decimal point)
Then you get a:
EPgError
Invalid input syntax for type numeric: "23,48178"
SQLState: 22P02
procedureName: set_var_from_str
LineNumber: 3023
Position: 0
Severity: Error
I have tried to insert same values with:
* SQL Manager 2007 lite for PostgreSQL
* PgAdmin III
* PostgresDAC 2.4.1 (with same dbgrid/dbnavigator form)
All of them are ok.
It seeems a bug. Somebody can check if it is failing too.
Thanks....