[Zope] database connections from external method

Vangelis Mihalopoulos mihalop at vtrip.net
Fri Oct 21 04:30:29 EDT 2005


Dieter Maurer wrote:

>Vangelis Mihalopoulos wrote at 2005-10-19 12:22 +0300:
>  
>
>>...
>>I am thinking of using a Z Database Connection (mysql) from within an 
>>external method, without using Z SQL Methods, but can't figure out how i 
>>can "safely" do it
>>    
>>
>
>Calling a "DA" object gives you a low level connection object (a
>"db" object). It has a "query" method. Calling it provides
>"safe" SQL execution.
>  
>
Thanks, this is what i had in mind.

>>From other posts, I understood that you want to do special things.
>  
>
Yes, this is true.

>In such cases, reading the source is necessary
>
Yes, i know. But this would take me much more time than sending an email 
to the Zope list and getting quick help from experienced Zopistas, time 
that i unfortunately cannot afford. Of course, reviewing product code on 
other cases wasn't such a big overhead and i got my task done.

> -- and being prepared
>that things may change between releases...
>  
>
Of course...  :-) 

>I follow the recommendation of others to use ZSQL methods...
>  
>
I am loading the zodb in read-only mode. If someone breaks into Zope 
(which btw i believe to be very secure) i don't want him to be able to 
directly access (read/write) the database i am using. *AFAIK*, 
ZSQLMethods won't do for this.


Thanks for your comments, helpful as always!

 - Vangelis


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20051021/b73a91c5/attachment.htm


More information about the Zope mailing list