[Zope-DB] Test for equality to Missing.Value (empty field)?

Dieter Maurer dieter@handshake.de
Mon, 25 Nov 2002 19:38:18 +0100


Jeff Kowalczyk writes:
 > How can I include the ZSQLMethod result's representation of an empty/null field value in a
 > two- or threeway equality test in python? My immediate need is to check in a tal:condition
 > that two fields are equal and yet not null, on results returned from Win32 Zope 2.5.1
In principle, this should be:

   tal:condition:"python field1 == field2 and fields1 is not None"

However, "ZODBCDA" may not convert SQL "null" to Python "None" (as it
should).
Then, I would suggest to drop "ZODBCDA" and use "ZMxODBCDA" (no longer
without costs, but affordable).
Or use the ZSyBaseDA to connect to SQL server via FreeTDS.


Dieter