Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent help needed! How to set NULL value to a binary field?

 
liang gu
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling a stored procedure in JDBC, and I need to set a IN binary field to the NULL value. How to do it? Will stmt.setBytes(null) work?
THANKS!
Liang
 
Branko Paskutini
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Liang, you can use PreparedStatement's method. PreparedStatement is superinterface to CallableStatement.
Branko.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic