I've tried various format strings which I think Access should
handle, but they all result in the unexpected exception error. I've
also tried changing the data type on the actionscript class to
String but it still gives the same results.
What would be really handy would be if I could see the exact
query which is being run against the database to try and determine
what is actually being entered when the error occurs.
this logging jdbc driver,
but so far I couldn't get it to work with the Access driver and the
trouble shooting documentation is very sparse.
If anyone has any clues on either how I can see the actual
update query SQLAssembler is running or what I need to do to enable
editable date fields I'd be very grateful.
MSSQL fails with the error "The Java type java.util.Date is
not a supported type."
So this might be a question of whether a specific JDBC driver
can map Java's date object to a field correctly.
I tried experimenting with another JDBC driver to connect to
It failed with a very similar error message, but it can be
tweaked to map the JAVA_OBJECT type to datetime, but there may be
side-effects of this change (e.g. another type without mapping
available defined my now cause a class cast exception rather than
resulting in an sql exception being raised).
In most situations storing the date in a timestamp would be
more appropriate than a datetime field, but as the SQLAssembler
appears to be unable to map Timestamp to anything but ByteArray
this solution doesn't seem feasible here. If SQLAssembler were to
map to java.
sql.Date instead of java.
util.Date, this would also be undesirable as the java.sql
version does not include the time.
If anyone is interested in the tweaks you need to make to the
jTDS driver then post here and I'll put the diff up, but really it
feels "a bit dodgy" to map JAVA_OBJECT jdbc fields to date and
probably not something you'd want to do in production for the sake
of reliability (this is just for a small internal project at my
Now I just need to work out how best to enable people to edit
a time as well as the date in the DateField...