Error executing database query using ColdFusion

Ok, this is a problem I solved a wee while ago via google and it is something that I have recently encountered on my shared remote server with support not aware of the fix…so I thought best broadcast.

Problem:
Error Executing Database Query.
Value ’0000-00-00′ can not be represented as java.swl.Date

The datasource is set up with a JDBC URL of:
jdbc:mysql://localhost:3306/newtriksexample

Solution:
Append this to the end of the url:
?zeroDateTimeBehavior=convertToNull

So we will have:
jdbc:mysql://localhost:3306/newtriksexample?zeroDateTimeBehavior=convertToNull

This entry was posted in Coldfusion. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

4 Comments

  1. Peter
    Posted June 20, 2007 at 10:43 pm | Permalink

    Can you explain a bit how JDBC URLs are used? This is a new concept to me…

  2. Posted June 21, 2007 at 4:06 pm | Permalink

    Check out one of my previous posts, there is a bit more info there for you…

    http://www.nutrixinteractive.com/blog/?p=36

  3. Mark Kecko
    Posted November 29, 2007 at 8:03 pm | Permalink

    I added this url string to my jdbc connection string and now my CF Server won’t start! Any ideas?

  4. Mark Kecko
    Posted November 29, 2007 at 8:49 pm | Permalink

    Started, just took a really long time. Thanks for the great tip!

One Trackback

  1. [...] Error executing database query using ColdFusion By newtriks Ok, this is a problem I solved a wee while ago via google and it is something that I have recently encountered on my shared remote server with support not aware of the fix…so I thought best broadcast. Problem: Error Executing Database … Newtriks Web Development – http://www.nutrixinteractive.com/blog Popularity: 1% [?] Listen to this podcast [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • FreeAgent sign-up


  • Recent Posts

  • Categories