I am having a problem with the result of a query. My query is resultin in 3 column . Then I add the row toa an arraylist. Sometimes my result will be null, the 3 colums will return nothing, because there is not information available. How can I store those values as '0s' in my arrayList.
Thank you in advance
I don't see anything at all in the post which makes it a post about JSP. It's obviously a post about JDBC.
Anyway you seem to have misunderstood the ResultSet.wasNull() method. It returns true if the previous column you read (via getString() or getInt() or whatever method) contained null. The way you use it in that code, it will always return null because there was no previous column read.
Example of how to use it:
However if you had interpreted those columns as numbers -- which they clearly are numbers -- instead of converting them to String, then you wouldn't have this problem. The getInt() method always returns zero when the underlying data is null.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com