If your Z SQL method is in another folder, either visible from the current folder or from the directory tree to the current folder, use
 
<dtml-with [Folder_Name]>
<dtml-call "update_something_sql">
</dtml-with>
 
If the Z SQL method is in a somewhat less obvious location, try:
 
<dtml-with [Root_Folder]>
<dtml-with [Folder1]>
<dtml-with [SQL_Folder]>
<dtml-call "update_something_sql">
</dtml-with>
</dtml-with>
</dtml-with>
 
Using the dtml-with tag, you can force the page to reference the namespace you want and you can recurse down a folder structure.  Just remember to close it as soon as you don't need the other namespace for anything otherwise you'll run into headaches of mis-referencing other objects.

>>> Asad Habib <ahabib@engin.umich.edu> 30/03/2004 5:56:24 am >>>
I have a DTML document that calls a DTML method which in turn calls
another DTML method. This second DTML method is called using the following
syntax:

<dtml-call "some_dtml_method">

Wihin this second DTML method I try to access a Z SQL method using the
following syntax:

<dtml-call "update_something_sql">

This causes Zope to flag me with an error which states the following:

Error Type: NameError
Error Value: global name 'update_something_sql' is not defined

I am fairly certain this is a namespace issue but I don't know how to
correct it. When I try accessing this same Z SQL method from the first
DTML method, everything works fine.

Also, for your information, the DTML document, the two DTML methods, and
the Z SQL method are all defined on the same level.

Any help would be greatly appreciated. Thanks.

- Asad

_________________________________________! ______
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )