[Zope] ZSQL to Python ???
chas
panda@skinnyhippo.com
Sun, 10 Oct 1999 15:27:54 +0800
At 11:12 AM 10/10/1999 +0100, Tony McDonald wrote:
>At 11:37 am -0500 8/10/99, Joshi, Sunit wrote:
>> Could someone please tell me, what would be the best way to pass in
>>the query- result of a ZSQL method to a python method.
>>
>>thanks
>>Sunit
Rather than pass the query-result to the python method,
surely it would be easier to pass the DA and then extract
the results using Python ? From an earlier post :
[snip]
On Mon, 27 Sep 1999, Hannu Krosing wrote:
> > Can anyone point out how do I reference a Zope DA Connection from an
> > external method. This way I can make use of an existing open connection
> > instead.
>
> >From a short look at the source it seems that you can just use
>
> YourZopeConnection.query('select * from data')
>
> I quess the result will be the same as from using ZSQL Method, but it
> may be something simpler.
[/snip]
It may also depend on the DB connector you're using but I remember seeing
posts about passing the MySQL DA on the list. I guess python methods and
external methods will both work ok.
chas