1
$\begingroup$

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:

DatabaseLink`JDBC::error:Illegalvalue:DatabaseLink`SQLDateTime[{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.

$\endgroup$

closed as off-topic by MarcoB, m_goldberg, LLlAMnYP, Oleksandr R., Öskå Aug 10 '15 at 20:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – MarcoB, LLlAMnYP, Oleksandr R., Öskå
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ 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 $\endgroup$ – rm -rf Aug 8 '15 at 14:39
  • 2
    $\begingroup$ 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) $\endgroup$ – rm -rf Aug 8 '15 at 14:42
  • $\begingroup$ @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. $\endgroup$ – Ariel Sepulveda Aug 8 '15 at 16:35
  • $\begingroup$ I'm not thinking much of it, but could it be related to this: sql-jdbc-zerodatetime? $\endgroup$ – Sjoerd C. de Vries Aug 8 '15 at 19:53
  • 1
    $\begingroup$ 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. $\endgroup$ – Leonid Shifrin Aug 8 '15 at 20:31