In both products and External methods I do something like the following:

def get_product(self, trans_id) :
        database = getattr(self, 'product_DA')    # product_DA is the database
        res = database().query(                   #  adaptor
                "select * from product_log where trans_id = '%s';"%(trans_id))
        
        fields = res[0]
        results = res[1]


This allows the database adaptor to pool connections and be setup
from the zope management screens.

--Bill Noon


_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to