Decimal value from database gets converted to int in app

sunnyjulka

Member
Joined
Sep 12, 2005
Messages
17
Programming Experience
1-3
Hi all
I am returning a decimal value from a stored procedure from my database to my vb.net app and in the application the value gets rounded off to integer. I have tried Cdec function and formatcurrency function but no luck.
In the stored procedure I used the output statement and return statement.
and i use @price as decimal(9,2)

any ideas

thanks for looking
 
Couple of Guesses here...

Check the schema (.xsd) file if you are using a dataset - should be decimal.
Check the properties of the control using price, some controls can have number formats associated with them that may be chopping of the decimal places.
@price is not being rounded unless it is used specifically in some sort of rounding function, my guess is that somewhere it is being set as an integer.


hope this helps...
 
Back
Top