decimal datatype problem

I have the following code in my app (PB 9.0.1.7119 & ASE 11.0.3):

decimal out
//at the moment: dw_1.GetItemNumber(1, "field_1") is equal to 17,17
out = dw_1.GetItemNumber(1, "field_1")
//after assignment out = 17,17000000000000256

What cases that situation? I happens very seldom. Do I have to round the
value like the following:
out = Round(dw_1.GetItemNumber(1, "field_1"), 2)

BTW: field_1 is numeric(12,2)



0
Piotr
3/26/2004 8:29:18 AM
sybase.powerbuilder.general 62418 articles. 17 followers. Follow

2 Replies
416 Views

Similar Articles

[PageSpeed] 29

use this:

decimal{2}

c.burns

"Piotr Nadolny" <pnad@o2.pl> ha scritto nel messaggio
news:4063e9db@forums-2-dub...
> I have the following code in my app (PB 9.0.1.7119 & ASE 11.0.3):
>
> decimal out
> //at the moment: dw_1.GetItemNumber(1, "field_1") is equal to 17,17
> out = dw_1.GetItemNumber(1, "field_1")
> //after assignment out = 17,17000000000000256
>
> What cases that situation? I happens very seldom. Do I have to round the
> value like the following:
> out = Round(dw_1.GetItemNumber(1, "field_1"), 2)
>
> BTW: field_1 is numeric(12,2)
>
>
>


0
Ricerche
3/26/2004 12:42:27 PM
great thanks, it works... ;)

U�ytkownik "Ricerche e Metodi s.r.l." <claudioburns@ricmedod.it> napisa� w
wiadomo�ci news:40642533$1@forums-1-dub...
> use this:
>
> decimal{2}
>
> c.burns
>
> "Piotr Nadolny" <pnad@o2.pl> ha scritto nel messaggio
> news:4063e9db@forums-2-dub...
> > I have the following code in my app (PB 9.0.1.7119 & ASE 11.0.3):
> >
> > decimal out
> > //at the moment: dw_1.GetItemNumber(1, "field_1") is equal to 17,17
> > out = dw_1.GetItemNumber(1, "field_1")
> > //after assignment out = 17,17000000000000256
> >
> > What cases that situation? I happens very seldom. Do I have to round the
> > value like the following:
> > out = Round(dw_1.GetItemNumber(1, "field_1"), 2)
> >
> > BTW: field_1 is numeric(12,2)
> >
> >
> >
>
>


0
Piotr
3/26/2004 1:11:42 PM
Reply: