Re[2]: [Zope] MySQL, ZMYSQLDA and date fields

Salvatore Sciacco Salvatore Sciacco <sas@prometeus.net>
Sun, 4 Mar 2001 20:08:46 +0100


Hello Peter,

thank you. I'll give a look to the db.py file. The second option is a no way
because when I have a query with a date field the whole select fail, I've no
chance to access the fields.

Sunday, March 04, 2001, 6:26:21 PM, you wrote:

PB> I had the problem with TIME fields.
PB> Somewhere at the top of db.py in /lib/python/Products/ZMySQLDA/ is a
PB> dictionary of fields to be converted. You'll find you fieldtype there as
PB> well. Comment it out from the conv dictionary.
PB> Or try to solve the problem by enclosing the DateTime stuff in a try: -
PB> except: clause.

PB> Peter

PB> ----- Original Message -----
PB> From: "Salvatore Sciacco" <sas@prometeus.net>
PB> To: <zope@zope.org>
PB> Sent: Saturday, March 03, 2001 4:09 PM
PB> Subject: [Zope] MySQL, ZMYSQLDA and date fields


>> Hello,
>>
>> I've a MySQL table with some datetime fields (not null). By default MYSQL
PB> put
>> '0000-00-00 00:00:00' (a zero date) in these field. When this happen I
PB> can't
>> select these fields anymore because Zope raise an invalid date format
>> exception.
>>
>> Do you know a workaround for this problem?
>>
>> Thank you.
>>
>> --
>> Best regards,
>>  Salvatore Sciacco                          mailto:sas@prometeus.net
>>
>>
>>
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://lists.zope.org/mailman/listinfo/zope
>> **   No cross posts or HTML encoding!  **
>> (Related lists -
>>  http://lists.zope.org/mailman/listinfo/zope-announce
>>  http://lists.zope.org/mailman/listinfo/zope-dev )



-- 
Best regards,
 Salvatore                            mailto:sas@prometeus.net