This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hi, I have a table where one of the column is a date. I am able to get the value entered in the textfield and insert the value in database using preparedStatement and setDate(). If the value entered in the texfield is empty, it enters '0000-00-00' as default in the database. The problem is I'm not able to retrieve the value for the date field if the textfield was empty. How do I test for null values? When I use if(res.getDate(5) == null) after the query to test for null values I get the exception:
Seema ! I too experiencing the same problem as u posted . i set default value as null in date field. and things work prety fine after that. But i have one query that mysql accept date in the format YYYY-MM-DD,and on the front i am accepting date in the dd-mm-yyyy format so do i have to convert it into mysql format thru coding or it will be convert by mysql automatically. please reply it its urgetnt