sun.jdbc.odbc.J dbcOdbcDriver is the driver I got with the SDK.
I've tried any kind of updateString you'd like (YYYY-MM-DD, YY-DD-MM, etc)
The Timestamp format sent back with a select query is
YYYY-DD-MM HH:MM:SS.M
Someone told me the update string should be between #'s but that also
didn't solve the problem.
I'm creating the Java timestamp with
theTimestamp = Timestamp.value Of("1998-10-12 00:00:00.0");
and then follows
resultset.updat eTimestamp(colu mnIndex,theTime stamp);
updateRow();
-C
"Steve Claflin" <Pi********@cs. compost> wrote in message
news:3F******** *******@cs.comp ost...
Dr X wrote:
I have a problem updating date values using Java via JDBC-ODBC to
Access.
<snip
rs.updateTimest amp(theIndex,th eTimeStamp);
rs.updateRow();
<snip>
(where theTimeStamp is a valid Java Timestamp and theIndex is the column
index in the resultset.)
is the way specified in the Java API. The (very non-specific) error
reported by the engine is simply 'Error in row'. !!
The timestamp parameter seems in order as it prints out a valid
toString() and the resultset cursor is fine too. How do you format this Timestamp
to be acceptable by Access?
I'm surprised you found a driver that was JDBC 2 compliant, but you
would have most likely gotten a different error message if that was the
case. (What driver are you using?)
You might try formatting the time stamp as a string and using
updateString with it. That has worked for me in the past, although you
have to make sure that the string has the date in a format that access
will accept in your locale (view a timestamp in access and duplicate the
format).
--
Steve
--
http://www.steveclaflin.com