No "cents" when getting data from DB2

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
rjbosch
Posts: 2
Joined: Tue Jan 11, 2011 9:09 pm

No "cents" when getting data from DB2

Post 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.
OOo 3.2 / OS X 10.6.6
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: No "cents" when getting data from DB2

Post 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.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
rjbosch
Posts: 2
Joined: Tue Jan 11, 2011 9:09 pm

Re: No "cents" when getting data from DB2

Post 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.
OOo 3.2 / OS X 10.6.6
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: No "cents" when getting data from DB2

Post by RPG »

Hello

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

Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
Post Reply