[Zope] underscores in Z SQL Method

Chad McDaniel chadm@sgi.com
05 Mar 1999 15:32:04 -0800


Hello all, I recently discovered Zope and am diving right in.

I have a Z SQL Method with the following Query Template:
---
select *
from rw_ProjectData 
where _id = <!--#sqlvar projID type=int-->
---

when I test it, I get the following:
---
Sorry, an error occurred.

Traceback (innermost last):
  File /usr/people/chadm/work/Zope-1.10.2-src/lib/python/ZPublisher/Publish.py, line 877, in publish_module
  File /usr/people/chadm/work/Zope-1.10.2-src/lib/python/ZPublisher/Publish.py, line 590, in publish
    (Info: /test/viewSRR/manage_test)
  File /usr/people/chadm/work/Zope-1.10.2-src/lib/python/Shared/DC/ZRDB/DA.py, line 302, in manage_test
    (Object: CopySource)
  File /usr/people/chadm/work/Zope-1.10.2-src/lib/python/DocumentTemplate/DT_String.py, line 513, in __call__
    (Object: <string>)
  File /usr/people/chadm/work/Zope-1.10.2-src/lib/python/DocumentTemplate/DT_In.py, line 599, in renderwb
    (Object: viewSRR)
  File /usr/people/chadm/work/Zope-1.10.2-src/lib/python/DocumentTemplate/DT_Var.py, line 237, in render
    (Object: _id)
KeyError: _id
---

I'm guessing that the parsing of the tokens picks up on underscore
('_') even outside of the DTML tags. Does anyone have a solution or
workaround?  

thanks


-- 
-chad