File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Hi, if the field of the table in mySQL is of type TimeStamp, how would I get it by ResultSet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Hi, if the field of the table in mySQL is of type TimeStamp, how would I get it by ResultSet?" Watch "Hi, if the field of the table in mySQL is of type TimeStamp, how would I get it by ResultSet?" New topic
Author

Hi, if the field of the table in mySQL is of type TimeStamp, how would I get it by ResultSet?

Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 598


This doesn't work, it creates a stack dump.
BTW, is there a third part tool that maps the database into table easily?
Thanks
Jack
nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

Jack Luk wrote:
This doesn't work, it creates a stack dump.


try


BTW, is there a third part tool that maps the database into table easily?

What exactly are you trying to do?
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

Use getTimestamp(int colIndex) that returns Timestamp.


The quieter you are, the more you are able to hear.
Jacky Luk
Ranch Hand

Joined: Aug 02, 2012
Posts: 598
Kemal Sokolovic wrote:Use getTimestamp(int colIndex) that returns Timestamp.


Thank you so much!
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

Moved to our JDBC forum.


Jack Luk wrote:BTW, is there a third part tool that maps the database into table easily?

Lots of them. Try to search for persistence framework or object-relational maping. We have a separate forum (Object Relational Mapping) dedicated to it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hi, if the field of the table in mySQL is of type TimeStamp, how would I get it by ResultSet?