1

2

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.

Question was closed 2015-08-10T20:22:43.893

2You 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 – 2015-08-08T14:39:44.637

2Also, 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 – 2015-08-08T14:42:52.837

@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 – 2015-08-08T16:35:19.557

I'm not thinking much of it, but could it be related to this: sql-jdbc-zerodatetime?

– Sjoerd C. de Vries – 2015-08-08T19:53:42.793

1As 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 – 2015-08-08T20:31:21.540

This surely isn't a two-minute task, but if you add such code to your app, it will help a lot in the long run. Because obviously right now your question can only be answered by someone who had this exact problem, as there is very little extra context you have available (what @TheToad said). – Leonid Shifrin – 2015-08-08T20:31:29.727

The problem was a bug in Mathematica Enterprise creating CDFs. Thanks for those who tried to help. – Ariel Sepulveda – 2015-08-19T16:09:13.033