Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 72
Eclipse IDE Java Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 825
5
Java Python Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use getTimestamp(int colIndex) that returns Timestamp.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kemal Sokolovic wrote:Use getTimestamp(int colIndex) that returns Timestamp.


Thank you so much!
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic