This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

resultsetmetadata

 
Alka ravi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Is above conversion INTEGER to DOUBLE is correct. if i use Interger.ParseInt() for INTEGER sql type and database has Interger field then it throws error for INTEGER like 11.0
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't really understand well what you are asking...
If you are talking about the first case, I don't see the point of setting double in a column that contains integer value.
Also, value 11.0 cannot be parsed to int, since it's not integer value.
 
Alka ravi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


this is best way to read the file?
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see a few problems with that code (apart from not being in code tags).

1) You use a Vector. You should declare it as a List and use ArrayList as the implementing class.
2) You should use generics.
3) You should definitely close the FileInputStream when you're done with it, in a finally block.

Other than that I find it odd that you take all cells and put them in one long Vector. You lose all information about which cell belongs to which row that way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic