File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes String to decimal? 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 » Java » Java in General
Bookmark "String to decimal?" Watch "String to decimal?" New topic

String to decimal?

smitha verghese
Ranch Hand

Joined: Jun 21, 2003
Posts: 42
I am using Access database and i retrieve the contents which is in "string" from the Excel sheet using ExcelApi and put into the database Production with field "decimal" type !
like this
But i get an error
at java.lang.FloatingDecimal.readJavaFormatString(
at java.lang.Double.valueOf(
at _0002fLineCount_0002ejspLineCount_jsp_100._jspService(_0002fLineCount
Amol Desai
Ranch Hand

Joined: Jan 29, 2003
Posts: 82
One of the getString() is returning null.
Better way would be to create a StringBuffer and append each rs.getString() to it.
You could then find which method returns null.
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Why don't you just do

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Since this isn't a performance question, I'm moving it in General (intermediate).
I agree. Here's the link:
subject: String to decimal?
jQuery in Action, 3rd edition