Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354811 - Empty SQL Results when column conversion fails
Summary: Empty SQL Results when column conversion fails
Status: NEW
Alias: None
Product: Data Tools
Classification: Tools
Component: SQL Results View (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: dtp.sqldevtools-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-16 07:07 EDT by Matthew Buckett CLA
Modified: 2011-08-16 07:08 EDT (History)
0 users

See Also:


Attachments
Stack trace in the Eclipse logs when the error occurs. (3.59 KB, text/plain)
2011-08-16 07:08 EDT, Matthew Buckett CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Buckett CLA 2011-08-16 07:07:34 EDT
Build Identifier: 20110615-0604

I was connecting to a MySQL database with DTP and attempting to select sample data from tables was failing. Looking in the logs I was getting a stack trace, the message in the logs was:

 java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 8 to TIMESTAMP.

there was visible error in Eclipse. I was using the latest MySQL Connector 5.1.17. There is some discussion about this on stackoverflow:

http://stackoverflow.com/questions/782823/handling-datetime-values-0000-00-00-000000-in-jdbc

and the workaround I used was to append "?zeroDateTimeBehavior=convertToNull" to my connection URL, however it would be good if the results viewer coped with this error internally and still displayed the result.



Reproducible: Always
Comment 1 Matthew Buckett CLA 2011-08-16 07:08:54 EDT
Created attachment 201559 [details]
Stack trace in the Eclipse logs when the error occurs.