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.
I assume your birth_date column in DB2 is Date data type. In this case I believe you would need to use setDate() not setString().
The PreparedStatement javadoc has this to say
"Note: The setter methods (setShort, setString, and so on) for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type INTEGER, then the method setInt should be used.
If arbitrary parameter type conversions are required, the method setObject should be used with a target SQL type."
so possibly you could use setObject(0, strBirthDate, java.sql.Types.DATE)
Joined: Mar 01, 2005
Yes, DB2 might look for some own format for date, but select * from mytable where birth_date = '03/01/1997' is working fine, thats why i am passing the date of this format and execute it using the prepared statement.