posted 17 years ago
2 Questions!
1) If I try and send a timestamp to an SqlServer database, where I want the timestamp to be millisecond perfect, how does one achieve this? The following code
oh so helpfully strips the hours, mins and seconds off the time, and as the setHour()/setMinute()/setSecond() methods are all depricated, i feel like strangling someone. Any ideas?
2)Is there anyway to execute an insert into a database and while doing so retrieve the newly created primary key. It would save two databse trips per insert. I've tried using the preparedStatement.execute() method, but no result set is returned, unsurprisingly.
Many thanks