Page 1 of 1

[Solved] PostgreSQL-JDBC numeric field truncated problem

Posted: Mon Feb 28, 2011 1:57 am
by awid
I have upgraded from 3.2.1 to 3.3.

I am using a form created in Base to input transaction details into a postgres database using the jdbc interface.
My problem is that when I input a $ amount into the transamount field this field is truncated in that only the dollar amount is inserted.
Your help would be much appreciated. This worked OK in 3.2.1. Test connection & Test class works OK.

Postgresql version 8.3.11 and postgresql-jdbc 8.3.603

Table field types below

transid serial NOT NULL,
transcode character varying(50),
transdate timestamp without time zone,
transdescription character varying(255),
transamount numeric,
CONSTRAINT tranststpk PRIMARY KEY (transid)

Re: PostgreSQL-JDBC numeric field truncatied problem

Posted: Mon Feb 28, 2011 2:37 pm
by r4zoli
What type of form controls you use on transamount field?
Formatted field or Currency field?

Re: PostgreSQL-JDBC numeric field truncatied problem

Posted: Tue Mar 01, 2011 8:11 am
by awid
I am using a formatted field.
Formatting: Category - Number Format code #.00
thanks

Re: PostgreSQL-JDBC numeric field truncated problem

Posted: Tue Mar 01, 2011 8:28 pm
by r4zoli
I think you use numeric type wrongly, not defined scale parameter: http://www.postgresql.org/docs/8.3/inte ... IC-DECIMAL

Re: PostgreSQL-JDBC numeric field truncated problem

Posted: Sun Mar 06, 2011 4:24 am
by awid
That was the problem - thanks for your help.