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.
We are using java 1.5 to access a PL/SQL procedure on oracle 9i database (9.2) and we are facing problem with passing the date to pl/sql procedure.
Through JDBC, we have to set this to an object of a procedure whose description is
timestamp DATE, commentText VARCHAR2(1000)
This is how we tried:
Object obj = new Object;
obj = ...
obj = ...
obj = new Timestamp(...)// java.sql.Timestamp : doesn't work
obj = "2009-11-17 11:30:21.111111111" // Concatenating fractional seconds: doesn't work
obj = new TIMESTAMP(date).toJdbc(); // oracle.sql.TIMESTAMP : doesn't work We have used SimpleDateFormat and converted date to the string form and tried to pass it, but still the same error
IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff