[Zope] Q: Accessing ZSQL methods from Python

a.wacknitz@francotyp.com a.wacknitz@francotyp.com
Wed, 7 Jun 2000 17:49:53 +0200


Hi all,

my question is what type or value is returned by a ZSQL method that is
invoked from Python?
Or, more precisely, how can I determine if a field contains a NULL value?
Sample code:

def myZSQLAccessFromPython(self, aParameter):
    """myZSQLAccessFromPython() returns a record set from a database
table."""
    #Call the ZSQL method
    rs = self.zsqlMethod(parameter=aParameter)
    if len(rs) == 1:
        #I expect exactly one result column
	  if rs[0].field is not NULL:          <- How to code this?
rs[0].field == None does not work
            Do_some_interesting_work()

TIA,
Andreas

**********************************************************************
This email message has been swept by MIMEsweeper for the presence of
computer viruses.

Francotyp-Postalia AG & Co.