Hi
I am trying to insert a date into Oracle data base and the application
hangs on the insert. Here is the code
PreparedStatement put_into_table = con.prepareStatement(
"insert into salereport values ( ? ,?)");
SimpleDateFormat formatter = new SimpleDateFormat ("dd-MMM-yyyy");
java.util.Date qryDate = formatter.parse("02-MAR-2000");
long timeinmilli = qryDate.getTime();
java.sql.Date sqlDate = new java.sql.Date(timeinmilli);
put_into_table.setDate(1, sqlDate);
put_into_table.setString(2, lineitemtype);
int row_inserted = put_into_table.executeUpdate();
Does any body have any clue what is wrong with this code ?
--ma--
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html