This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am trying to time stamp an object when sending it to a MS Access database but am struggling to format the date object correctly. When the date component of my statement is removed, the excecuteStatement() method works just fine so Im sure it is the date format. How do I format it correctly to MS Access format so I don't get anymore 30 line SQLExceptions!?! Thanks in advance Dave
You could probably work it out with a SimpleDateFormat and knowing what format Access likes. However, I suggest using a PreparedStatement, and then using the setDate() method. That way the driver would just figure it out for you.