Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic