[Zope] NameError

adam adam@centurysoftware.com.au
Fri, 7 Jun 2002 14:38:58 +0800


Hi Eric,


There should be no ticks - thats the beauty of dtml-sqlvar -- it handles the
ticks for you...

Hope this helps,
Adam


-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
eric.n.dunn@bankofamerica.com
Sent: Friday, 7 June 2002 4:14 AM
To: thierry@nekhem.com
Cc: zope@zope.org
Subject: [Zope] NameError




I tried all combo's of single-ticks, double-quotes  etc...  (code is
straight out of WACK book)
Using Zope 2.5 w/ Deban and Postgres w/ Z PoPy Database Connection

Any ideas?

Sql Method

INSERT INTO Addressbook
(Name,FirstName,Address,City,ZIP,Phone)
VALUES
(?<dtml-sqlvar Name type=string>?,
?<dtml-sqlvar FirstName type=string>?,
?<dtml-sqlvar Address type=string>?,
?<dtml-sqlvar City type=string>?,
<dtml-sqlvar ZIP type=int>,
?<dtml-sqlvar Phone type=string>?)

Error message

onclick="this.firstChild.data=this.lastChild.data">
        &sect;<!--
Traceback (innermost last):
  File /local/zope-2.5/lib/python/ZPublisher/Publish.py, line 150, in
publish_module
  File /local/zope-2.5/lib/python/ZPublisher/Publish.py, line 114, in
publish
  File /local/zope-2.5/lib/python/Zope/__init__.py, line 158, in
zpublisher_exception_hook
    (Object: addRecord)
  File /local/zope-2.5/lib/python/ZPublisher/Publish.py, line 98, in publish
  File /local/zope-2.5/lib/python/ZPublisher/mapply.py, line 88, in mapply
    (Object: manage_test)
  File /local/zope-2.5/lib/python/ZPublisher/Publish.py, line 39, in
call_object
    (Object: manage_test)
  File /local/zope-2.5/lib/python/Shared/DC/ZRDB/DA.py, line 328, in
manage_test
    (Object: addRecord)
  File /local/zope-2.5/lib/python/Shared/DC/ZRDB/DA.py, line 306, in
manage_test
    (Object: addRecord)
  File /local/zope-2.5/lib/python/Shared/DC/ZRDB/DA.py, line 414, in
__call__
    (Object: addRecord)
  File /local/zope-2.5/lib/python/DocumentTemplate/DT_String.py, line 473,
in __call__
    (Object: &lt;string&gt;)
  File /local/zope-2.5/lib/python/Shared/DC/ZRDB/sqlvar.py, line 134, in
render
    (Object: Name)
  File /local/zope/lib/python/Products/ZPoPyDA/PoPy_DA.py, line 103, in
sql_quote__
    (Object: mad)
NameError: global name 'string' is not defined

Eric Dunn




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