<DIV>
<DIV>But how do I get the connection id ?</DIV>
<DIV>Actually I get it when I instance the product in Zope.</DIV>
<DIV>What I think is something like</DIV>
<DIV>&nbsp;</DIV>
<DIV>class Foo</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; def __init__ (self, conn):</DIV>
<DIV>&nbsp;&nbsp;&nbsp; self.conn = conn</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; myquery = SQL ('doMyQuery', '', self.conn, '', 'select * from table')</DIV>
<DIV>&nbsp;</DIV>
<DIV>but obviously it will not work.</DIV>
<DIV>&nbsp;</DIV>
<DIV>TIA,</DIV>
<DIV>&nbsp; ngw</DIV>
<DIV>&nbsp;</DIV>
<DIV>p.s. Sorry for top-posting<BR><BR><B><I>Marco Bizzarri &lt;m.bizzarri@icube.it&gt;</I></B> ha scritto: </DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">I can't talk for best practise. You can put your queries also outside of<BR>the init, in this way:<BR><BR>class YourProduct:<BR><BR>_my_query = SQL('doMyQuery', '',<BR>'your_connection', '', 'select * from data')<BR><BR>def __init__(self):<BR>pass<BR><BR><BR>Also, if you have a *LOT* of queries, consider in building your query on<BR>the fly.<BR></BLOCKQUOTE></DIV><p>
                <hr size=1><font face="Arial" size="2"><a href="http://us.rd.yahoo.com/mail_it/taglines/*http://it.mail.yahoo.com"><b>Yahoo! Mail</b></a>: gratis 1GB per i messaggi, antispam, antivirus, POP3</font>