Page 1 of 1

No "cents" when getting data from DB2

Posted: Tue Jan 11, 2011 9:17 pm
by rjbosch
I am using Base to fetch information from DB2 tables via ODBC, located remotely on our company's mainframe.

I notice however that fields that have been defined as DECIMAL(15,2) all are returned with the cents rounded down. In other words: an amount of 123.57 is returned as 123.00

How can I get the pennies back? CASTing and CONVERTing does not do the trick.

Another application I use the same ODBC driver with has no problems with it. It is just OOo that has this.

Re: No "cents" when getting data from DB2

Posted: Tue Jan 11, 2011 10:06 pm
by r4zoli
The best what you can do try JDBC connection, ODBC connection to DB2 has some problems which not solved in OOo Base for a long time.

Re: No "cents" when getting data from DB2

Posted: Wed Jan 12, 2011 2:04 pm
by rjbosch
Thanks,
I've tried JDBC and that works fine; decimals are there.

Unfortunately I stumble across many other issues now. It is not possible to get a working forms with a subform. It is possible to build it alright, but no matter what I try (an not matter how thoroughly I check if I did everything OK) the subform won't get populated with anything. It remains empty.
Also, as master form, I can't use a query (i.s.o. a table) since then the wizard doesn't even let me choose the information for the subform.

Looks like OOo can't work properly with DB2 irrespective of the driver, so I will have to look elsewhere.

Re: No "cents" when getting data from DB2

Posted: Wed Jan 12, 2011 2:17 pm
by RPG
Hello

You better use OOo3.1.1 or OOo3.3 RC 8.

Romke