# Awkward DatabaseLink JDBC Error [closed]

I've created a GUI application (a database editor) that uses DatabaseLink and it is currently working fine on my PC (M10.02, Windows 7) and on a clients's PC (CDF Player Pro 10.02, Windiws 8). While using it on a third computer (CDF Player Pro 10.02, Windows 7) the app fails after a couple of clicks. The database is MySQL and I have tested the app on a local database (on my PC, and on the 1st client PC) and also on a cloud based database (on my PC and on the third PC where the error is generated). The message it generates is this:

DatabaseLinkJDBC::error:Illegalvalue:DatabaseLinkSQLDateTime[{2015,8,7,0,0,0.0}]


Initially the app seems to work fine (SQLSelect used and results with dates displayed fine), but once this warning message appears the app apparently looses the capability of handling dates correctly. It is not clear yet when in the process the message appears for the first time or what triggers the error or bug. What is clear is that the error is only generated on that third computer.

At this point I have no idea what could be causing the problem as the date itself doesn't seem to be the problem. The code is thousands of lines long, so I won't be able to share it. I hope that this information is enough for experienced and knowledgeable developers. Any hint will be appreciated.

• You might not be able to share the code, but could you please update your post with 1) OS version 2) Mathematica version and 3) Database backend (PostgreSQL/MySQL/SQLite/etc.) 4) Some context around what your app is doing when this error occurs (is it a read/write/update?). Some contextual code snippets would be helpful – rm -rf Aug 8 '15 at 14:39
• Also, are you trying to insert TIMESTAMP into a DATE field? Is this error in the middle of a transaction? If so, does rolling back fix the issue (at least the "it apparently looses the capability of handling dates correctly." part) – rm -rf Aug 8 '15 at 14:42
• @TheToad Thaks for yor interest in my post. I have updated the question trying to provide the information you requested. Since the problem occurs in the client's computer using CDF Player Pro I'm initially trying to avoid debugging the code in front of the client. Thus, I don't have much information on where in the process the error occurs. If needed I'll eventually have to use my client's environment for debugging but I'm hoping I'll be able to avoid that. At this point I rely on this forum for help. I'll eventually share the solution to the problem for the benefit of the community. – Ariel Sepulveda Aug 8 '15 at 16:35
• I'm not thinking much of it, but could it be related to this: sql-jdbc-zerodatetime? – Sjoerd C. de Vries Aug 8 '15 at 19:53
• As an alternative to debugging, you can add logging (which is a good thing to do in general), to your application code, as well as an ability to execute the code in specific dynamic environments (like environments which would, for example, intercept all messages and log the associated execution stack and / or other information. On this site, there were many examples of how to construct such environments). You can then update your client's code, and get the log back for analysis. – Leonid Shifrin Aug 8 '15 at 20:31