This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Storing date as null value in the backend using JDBC

 
savitha rao
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one let me know whether i can store a Timestamp object as null in the backend.
thanx in advance
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a date can be stored as a null in my table(oracle):
java.sql.Timestamp nullTimestamp = null;
...
ps.setDate(1,nullTimestamp); //will enter null into the database
hope this helps
Jamie
p.s. - Why don't you just try it?? If it works, then you can do it, if it does not work, then you can't. I don't know what constraints, relationships etc are on your table so it is hard for me to speculate its capabilities to store null values.

[This message has been edited by Jamie Robertson (edited August 13, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic