Expand my Community achievements bar.

LCDS 2.5.1: Problems storing Date() in database

Avatar

Former Community Member
Hi all!



I hope someone is able to help me with with this:



I've got a [Managed] [RemoteClass] public class Project, that is stored and updated just fine on Microsoft SQL Server, using msbase.jar and mssqlserver.jar from Microsoft.



However, as I include a Date(), the LCDS complains about not recognizing the data type:

[Flex 3] 08/07/2008 13:52:30.525 [DEBUG] [Service.Data.Transaction] Started transaction using jndi name: java:comp/UserTransaction

[Flex 3] 08/07/2008 13:52:30.540 [DEBUG]

[Service.Data.SQL] SQL Assembler jdbc exception on operation=update-item error=java.sql.SQLException:

[Microsoft][SQLServer 2000 Driver for JDBC]Unable to determine the type of the specified object.

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.base.BasePreparedStatement.setObject(Unknown Source)

at flex.data.assemblers.SQLAssembler.setSQLParameters(SQLAssembler.java:1342)

at flex.data.assemblers.SQLAssembler.updateItem(SQLAssembler.java:1206)

at flex.data.adapters.JavaAdapter.doUpdateItem(JavaAdapter.java:1659)



I've tried playing the RemoteClass, extending Date(), trying variations the data-management-config.xml without any success.



Anyone worked with dates and MSQL?

Are there newer versions of msbase.jar and mssqlserver.jar? Other ways?



Regard,

Vegard
1 Reply

Avatar

Level 4
This is a bit similar to a problem I had about a year ago... I believe my error may differ slightly because I was using the SQL Server 2005 edition of the driver:



http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=583&threadid=1289201&m...



The workaround I ended up using was not something I was happy with, but this was for a small internal project so it was good enough for me. As I said at the time the solution is "a bit dodgy", and I offered the diffs for the jTDS source but nobody has asked to date. I may still have these somewhere, but they will be for an out of date version of the driver by now.



I'd suggest contacting Adobe support if you have an agreement in place, perhaps there is a patch or better workaround than I could come up already available.



Altering the database driver is really not ideal, and if the source to SQLAssembler was available I believe it should be fairly simple to implement a workaround there.



It may also be worth confirming this still occurs in version LCDS 2.6.