File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes BigDecimal question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "BigDecimal question" Watch "BigDecimal question" New topic

BigDecimal question

Red Green

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

Joined: May 17, 2001
Posts: 2823
Red Green

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
when you say the column value is numeric you can use rs.getInt("columnName") also, it depends upon the column's datatype.
Dirk Schreckmann

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:
subject: BigDecimal question
It's not a secret anymore!