Hi All,

I've got a Zope3 app consisting of some sqlos classes for database access (against a postgres database) and I need to write a script for some batch processing of database content outside of Zope.

The problem is that when I try to initialize a connection for sqlos objects, e.g.:

sqlobject_dsn = 'dbi://user:[EMAIL PROTECTED]/db'
da = PostgresAdapter(sqlobject_dsn)
sqlhub.processConnection = da

and try to do something with my class, e.g.:

DBClass.select().count()

I get:

AttributeError: 'ConnectionDescriptor' object has no attribute 'accumulateSelect'

My reading of the sqlobject documentation (http://www.sqlobject.org/SQLObject.html#using-sqlobject-an-introduction) is that sqlhub.processConnection is supposed to establish the connection for all classes, but it doesn't seem to be the case.

Help !!!!

Cheers, Andrew.
-----------------------------------
Reurbanise - Urban Sustainability
ph: (03) 3528 055, mobile: 0274 992 569
http://www.reurbanise.co.nz
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to