cancel
Showing results for 
Search instead for 
Did you mean: 

Problem displaying decimals in PB app on Windows 2008 R2

Former Member
0 Kudos

We are having an issue on our database server when we run our PowerBuilder 12 application on it.

Our set up is that we have about 25 client 64 and 32 bit Windows 7 workstations running this PowerBuilder application with an oracle 9i client, and a Windows 2008 R2 dev/test server with an oracle 11 Database and client (32 bit) running the PowerBuilder application, and lastly a windows 2008 R2 production database server running Oracle 11 database and client (also have a 9i client on there as well for testing).

Basically the problem is (which only happens on the production server), whereever we have a decimal(2) field in a window, the number which should be displayed as 750.50 is being displayed as 75050 etc....  When we put a decimal and currency format on the field (an edit field) the value will always just have a .00 at the end and again numbers like $750.50 will appear as $75050.00. The decimal place is being dropped completely for no apparent reason (and a new decimal place is being added to the end of the number).  On fields that are text fields were number get displayed, this numbers appear fine. 

We have in the past notice this very rarely on workstations when the Windows regional settings were not set as English(United States).  We would then just reimage the machine (since it was only a workstation) and set the region as English(United States) during the operating system installation, and things would be good again.  The problem now is that we cannot just reimage our database server as it is our database server and we are in a 24/7 environment...

We did try to change the regional settings on our production database server to see it would then show the columns correctly, but it did not make any difference.  We contacted Microsoft technical support, but they have been unhelpful and suggest that PowerBuilder is the problem (despite the fact that on our other servers and workstations with the US regional settings, it works fine).

Can anybody tell me if you have experienced this issue before and if so, what you did to resolve it please?  We are hoping to avoid rebuilding our database server and being down for a couple of days...

Thank You.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

     OK,  we found the problem.  On our production server (Windows 2008) we had installed an Oracle 9i client as our application is 32 bit and the 9i client works for Windows 7.  So we initially tested with the 9i client as we thought it worked.  We then installed the 32 bit Oracle client 11 client but still had the problem with the decimals.  We assumed that the issue was not the client as we could not recreate the problem anywhere else, also the environment variables appeared to be different on this server.  And, after having this same issue in the past and finding it to be related to the environmental variables for decimals etc.. , we wrongly pursued this avenue. 

     So we changed our environmental values and rebooted the server, contacted MS support etc...  But we did not fix the problem.  Then we tried running queries using dos sqlplus from the bin directory of each oracle home on the server (there were 3).  Then and only then did we see that the issue was appearing only in the 9i client's sqlplus (and not just in Our PowerBuilder application).  However, we were using or so we thought we were using, the 32 bit Oracle 11 client to connect our application to the database.  But it turns out that we were not.  After checking our path, it turns out that the 9i client was before out other client and we were falsely thinking that it was not being used anymore (when it totally was being used). 

     After removing that entry from the path, decimals began to appear correctly.

So, it appears that for whatever reason, the 9i oracle client did not work properly for us on our Window 2008 database server.  I am not suggesting that it will not work properly for you, but for us it did not (please don't sue me Oracle or Microsoft, I think your products are great!!)...

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi David,

What build number of PB 12 are you using ?  What type of window controls or dw controls are you using?


PB reads the regional settings from the registry under: Hkey_Current_User\Control Panel\International.

Try using Process Monitor or write a small PB app with registryget() to see if PB can access HKCU\Control Panel\International.

Thanks,
Beverly


Former Member
0 Kudos

Hi Beverly,

Thanks for your suggestion.  It lead us to confirm the access to the proper registry keys and it also lead us to try using different software to connect to the database on that server.  That pointed us into the right direction.  We found the solution and it was related to us having had a messed up oracle client setup.

Thanks,

Dave...