[ZPT] No access to SQLConnectionIds() ?

Brent M Hendricks brentmh@ece.rice.edu
Sat, 30 Mar 2002 18:55:44 -0600


Dieter Maurer wrote:
> Brent M Hendricks writes:
>  > In DTML you could iterate over the available SQLConnections by doing:
>  > 
>  > <dtml-in "SQLConnectionIDs()">
>  > 
>  > How do I do this in ZPT?  The function isn't available directly, and 
>  > when I try python:modules['SQL'].SQLConnectionIDs() it gives me
>  > 
>  > exceptions.ImportError on import of "SQL" is unauthorized
>  > 
>  > If it's available to DTML, then why not ZPT?
> Try:
> 
>      "here/SQLConnectionIds"
> 
> "SQLConnectionIds" are available as so called "folder" methods,
> methods of "Folder" instances.
> 
> Provided that "here" either is itself a folder or has a folder in its
> acquisition chain, "here/SQLConnectionIds" will give you what you want.
>

Ahh, gotcha.

Thanks!

-- Brent

-------------------------------------------------------------------------

"The programmer, like the poet, works only slightly removed from pure
  thought-stuff.  He builds his castles in the air, from air, creating
  by exertion of the imagination.  Few media of creation are so
  flexible, so easy to polish and rework, so readily capable of
  realizing grand conceptual structures."
                         -- Frederick Brooks, Jr., The Mythical Man Month