On Sun, Nov 26, 2006 at 10:39:39AM +0000, Paul-Michael Agapow wrote:
>    class Report (sqlobject.SQLObject):
>       _connection = None
>       class sqlmeta:
>          fromDatabase = True

   You are trying to draw the table's declaration from a DB without setting
a connection. That couldn't work, of course. Either set a connection or do
not use fromDatabase. SQLObject draw tables' declarations from database at
the class creation time (in the metaclass).

> While I'm at it, any advice about using SQLObject with Zope? While  
> there is sqlos, it seems like a very industrial approach that maps a  
> db into the Zope database and I just want to make a few queries and  
> write a few records.

   You can use SQLObject directly. The only caveat is: SQLObject classes
are not reloadable. If you would want to change your application you would
have to restart Zope, not reload the application.

> And finally, is the `class sqlmeta` the current and future way of  
> declaring `fromDatabase=True`?

   Yes, it is.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to