Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added date argument to CS courtesy Sami Koivu

...

Code Block
bgColor#ccccff
private void storeDateinDB(java.util.Date date) throws SQLException {
  final java.util.Date copy = new java.util.Date(date.getTime());
  validateValue(copy.getTime());

  Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://<HOST>:1433","<UID>","<PWD>");

  PreparedStatement pstmt = con.prepareStatement("UPDATE ACCESSDB SET TIME = ?");
  pstmt.setLong(1, copy.getTime());
  // ...
}	

...