[Zope-DB] Error Value: Invalid value, 0000-00-00, for ...
Wed, 26 Mar 2003 12:49:21 -0000
This happens because you have put null into a not null column with the
default '0000-00-00 00:00:00' which is the standard default when no default
----- Original Message -----
From: "M.-A. Lemburg" <firstname.lastname@example.org>
To: "Charlie Clark" <email@example.com>
Sent: Wednesday, March 26, 2003 12:33 PM
Subject: Re: [Zope-DB] Error Value: Invalid value, 0000-00-00, for ...
> Charlie Clark wrote:
> > On 2003-03-26 at 13:15:07 [+0100], Frerichs, Thomas (CONS FIN) wrote:
> >>Hi all,
> >>I try to select some data out of a MySQL database which contains a
> >>suspension_date of type date.
> >>Now when suspension_date is NULL the retrieved data for that column is
> >>'0000-00-00'. This raises the following error in Zope: Error Type:
> >>Error Value: Invalid value, 0000-00-00, for suspension_date in record 0
> >>I didn't found any information how to work around this problem. I found
> >>similar problem description in a German mailing list but nobody sent a
> >>solution yet.
> >>I use:
> >>Zope 2.6.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32;
> >>MySQL 3.23.54-win and
> >>Has anyone an idea how to explain Zope that a date '0000-00-00' is a
> > No, but you might want to try using the mxODBC driver and DA as it looks
> > like ZODBCDA / MyODBC are not working properly. I've had no problems
> > NULL dates in MySQL when using the Python MySQL driver.
> That's really a problem with MySQL. I'm not sure how the new
> MyODBC driver deals with this, but the old one definitely returned
> 0000-00-00 as well. mxDateTime happily accepts this date, but the
> conversion to Zope's DateTime which is done to be more compatible
> to ZODBC will fail with mxODBC Zope DA too.
> Marc-Andre Lemburg
> Professional Python Software directly from the Source (#1, Mar 26 2003)
> >>> Python/Zope Products & Consulting ... http://www.egenix.com/
> >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
> Python UK 2003, Oxford: 6 days left
> EuroPython 2003, Charleroi, Belgium: 90 days left
> Zope-DB mailing list