• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about getLong() of ResultSet  RSS feed

 
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
Boost this thread!