[Zope-DB] How lunch SQL request from python script ?

Charlie Clark charlie at egenix.com
Fri Jan 19 07:37:29 EST 2007


Am 19.01.2007, 13:27 Uhr, schrieb Maciej Wisniowski  
<maciej.wisniowski at coig.katowice.pl>:

> Please, stay on the list
> First, isn't Charlie Clark solution good for you? It seems to be
> reasonable.

Thanks! ;-)

>> I have try to use external method but without success... (I have read  
>> some post as you suggested it)
>>
> Create database connection object called 'myconnection' in ZMI and
> connect it to your database.
> Create external method like:
> def callSQL(self, statement):
>      conn = self.myconnection()
>      return conn.query(statement)

The only thing that's missing for me is using this idiom with existing  
ZSQL methods and that's because I've forgotten how to get them to render  
the query rather than execute it. Anyone care to enlighten me! ;-)

Charlie


More information about the Zope-DB mailing list