Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes BigDecimal question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "BigDecimal question" Watch "BigDecimal question" New topic
Author

BigDecimal question

Red Green
Greenhorn

Joined: Sep 27, 2001
Posts: 15
java.math.BigDecimal gotNum = rs.getBigDecimal("someNumericValue");
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
D
Red Green
Greenhorn

Joined: Sep 27, 2001
Posts: 15
i am sorry about the initial posting, i guess i didn't do a full copy before my cut and paste. anyway the question is: is this the correct format to get the numeric value from the recordset?
java.math.BigDecimal gotNum = rs.getBigDecimal("someNumbericValue");
saravanan balu
Ranch Hand

Joined: May 19, 2000
Posts: 49
Hi,
when you say the column value is numeric you can use rs.getInt("columnName") also, it depends upon the column's datatype.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
saravanan balu,

You might notice that the date of the initial post is from almost three years ago.

----

Red Green,

Should you ever return...

Welcome back to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!

----

Moving this to the JDBC forum...
[ June 10, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BigDecimal question