[Zope3-Users] sqlobject problem

Andrew Groom andrew at reurbanise.co.nz
Tue Nov 7 17:37:43 EST 2006


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:password@localhost/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


More information about the Zope3-users mailing list