[Zope] External methods calling ZSQl methods
J C Lawrence
claw@kanga.nu
Wed, 09 Feb 2000 15:33:05 -0800
I've read (and am following) the HOW-To, but I seem to be missing
something. I have a ZSQL method called GatCat which reads:
SELECT *
FROM Categories
WHERE <dtml-sqltest CatID type=int>
My external method reads (in part):
def CategoryPath (self, baseURL, catID):
div = " / "
catPath = ""
while (catID != 0):
results=self.GetCat (CatID=int(catID))
...lotsa boring logic in here...
return catPath
When I attempt to call this external method from a DTML method as
so:
<dtml-var "CategoryPath('http://www.kanga.nu/', 1)">
I get the following error:
The database connection Library_database_connection cannot be found.
GetCat works fine when tested by itself as well as when called from
DTML methods by anonymous users (ie the permissions seem fine).
What am I missing?
--
J C Lawrence Home: claw@kanga.nu
----------(*) Other: coder@kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--