Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about getLong() of ResultSet

 
Jen Yang
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The getLong() of ResultSet returns 0 when the field has a null value. What if the field has a value 0? How do I tell the difference? Thanks.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After calling rs.getLong(), call rs.wasNull() .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic