Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PowerBuilder and Oracle Decimal Problem

579 views
Skip to first unread message

Yasin KENÇ

unread,
Apr 16, 2008, 11:43:25 AM4/16/08
to
Hi,

I have two type problems related to Oracle Procedure. First My Procedure
return to decimal value for example
"2.20" but out pb program taking the that value "220.00" .Second Procedure
has a Number Parameter I am filling decimal value like "2.20" then i am
getting the error message from oracle [ORA-06502: PL/SQL: numeric or value
error: character to number conversion error]
My Decimal seperator is "," in windows registry.

Also i am using that methods in my application,

SQLCA.DBPARM= " DecimalSeparator=','" //Decimal separator filling from
windows registry
and my program execute the bellow oracle statement
"ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '",."'" ////Decimal and Thousand
separator filling from windows registry

Developing Enviroment:
Windows VISTA
PB 9.0.3 8614
Oracle 10g client

Do you have any idea ?
Yasin


Terry Dykstra

unread,
Apr 16, 2008, 12:34:48 PM4/16/08
to
Most likely that is a problem with the NLS_LANG defined in the registry.
When mine was set to French Canadian, I had the same problem with the
decimal moving 2 positions. Using AMERICAN_AMERICA.WE8ISO8859P1 the problem
went away.

In your program you are specifically setting the decimal character to a
comma, but you pass in a period in your procedure argument. You're
contradicting yourself here.

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com/cx/cx.stm
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Yasin KENÇ" <ya...@verisoft.com> wrote in message
news:48061e9d$1@forums-1-dub...

Yasin KENÇ

unread,
Apr 16, 2008, 1:58:14 PM4/16/08
to
Thanks your explanation,
however, I have to use AMERICAN_AMERICA.WE8ISO8859P9.
In plain words, i could not solve that problem because i have different
customer,
they have different NLS_LANG. so as you kow powerbuilder use "." separator
for internal processing
(Datawindow format like this ) I am not sure, should I use "." seperator for
all NLS_LANG instead of registry value.

Also Our example values seems not correct but that just example, i am using
"," seperator in my machine

Thanks a lot for your advice
I am waiting new advices
Yasin


"Terry Dykstra" <tddy...@forestoil.ca> wrote in message
news:48062aa8$1@forums-1-dub...

KARLA

unread,
Apr 16, 2008, 4:03:52 PM4/16/08
to
SQLCA.DBParm =
"PBCatalogOwner='SGA',TableCriteria=',SGA%,''TABLE''',DisableBind=1,NumbersInternal=1"

"Yasin KENÇ" <ya...@verisoft.com> escribió en el mensaje
news:48063e36@forums-1-dub...

Mim

unread,
Apr 21, 2008, 7:48:22 AM4/21/08
to
Hello,

I have encountered the same problem recently and I found out that the
NLS_LANG parameter in the registry maps to the NLS_LANGUAGE and
NLS_TERRITORY parameters in view v$nls_parameters.
You can alter these parameter for your db session with following
statements:
ls_sql = "ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'"
ls_sql = "ALTER SESSION SET NLS_TERRITORY= 'AMERICA'"

This way, the NLS_LANG registery setting stays unaltered (for other
apps using it), but your pb applications will always use the same
parameters.

Greetz,

Michèle

0 new messages