This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes setInt Null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "setInt Null" Watch "setInt Null" New topic
Author

setInt Null

anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
Hi,

Can anyone help me?

How to set Null in the preparedstatement.setInt(NULL) in jdbc?


Thanks


Syed Ullah
Greenhorn

Joined: Mar 10, 2010
Posts: 9
stmt.setNull(2, java.sql.Types.INTEGER);

Here 2 is the column index. Replace it with your index variable/value.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setInt Null
 
It's not a secret anymore!