aspose file tools*
The moose likes JDBC and the fly likes resultsetmetadata Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "resultsetmetadata" Watch "resultsetmetadata" New topic
Author

resultsetmetadata

Alka ravi
Greenhorn

Joined: Sep 04, 2012
Posts: 7



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

Joined: Jun 19, 2010
Posts: 825
    
    5

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.


The quieter you are, the more you are able to hear.
Alka ravi
Greenhorn

Joined: Sep 04, 2012
Posts: 7


this is best way to read the file?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19785
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: resultsetmetadata