[Zope] sqlsession and postgresql
Anthony Baxter
Anthony Baxter <anthony@interlink.com.au>
Thu, 23 Mar 2000 15:07:10 +1100
There's a bug in SQLSession - edit the sqlDeleteQuery and add a default
argument to the second arg of =""
Anthony
>>> "Shortie Lo" wrote
> (sorry for asking this question again. i do need some help... ^_^)
>
> my table schema:
>
> create sequence sessions_session_seq;
> create tale sessions ( session varchar(255), primary key (session) );
> create table session_data ( session varchar(255), name varchar(255), value
> varchar(255) );
>
> i have changed sqlSessionCreate SQL method:
>
> insert into sessions ( session ) value ( nextval('sessions_session_seq') ::
> varchar )
>
> i wrote some tests in dtml method:
>
> <dtml-comment>
> things work
> </dtml-comment>
> <dtml-call Session>
> <dtml-call "SESSION.set('attribute1', formField1'">
> <dtml-call "SESSION['attribute1']">
> <dtml-in "SESSION.keys()">
> <dtml-var sequence-item> = "<dtml-var "SESSION[_['sequence-item']]">"<br>
> </dtml-in>
>
> <dtml-comment>
> things don't work
> <dtml-call "SESSION.clear()">
> </dtml-comment>
>
> if i uncommented "things don't work" block, i will get traceback:
>
> Traceback (innermost last):
> File /home3/local/src/Zope-2.1.5-src/lib/python/ZPublisher/Publish.py,
> line 214, in publish_module
> File /home3/local/src/Zope-2.1.5-src/lib/python/ZPublisher/Publish.py,
> line 179, in publish
> File /home3/local/src/Zope-2.1.5-src/lib/python/Zope/__init__.py, line
> 202, in zpublisher_exception_hook
> (Object: ElementWithAttributes)
> File /home3/local/src/Zope-2.1.5-src/lib/python/ZPublisher/Publish.py,
> line 165, in publish
> File /home3/local/src/Zope-2.1.5-src/lib/python/ZPublisher/mapply.py, line
> 160, in mapply
> (Object: sessiontest)
> File /home3/local/src/Zope-2.1.5-src/lib/python/ZPublisher/Publish.py,
> line 102, in call_object
> (Object: sessiontest)
> File /home3/local/src/Zope-2.1.5-src/lib/python/OFS/DTMLMethod.py, line
> 150, in __call__
> (Object: sessiontest)
> File
> /home3/local/src/Zope-2.1.5-src/lib/python/DocumentTemplate/DT_String.py,
> line 502, in __call__
> (Object: sessiontest)
> File
> /home3/local/src/Zope-2.1.5-src/lib/python/DocumentTemplate/DT_Util.py, line
> 335, in eval
> (Object: SESSION.clear())
> (Info: SESSION)
> File <string>, line 0, in ?
> File
> /usr/local/src/Zope-2.1.6-src/lib/python/Products/SQLSession/SQLSession.py,
> line 172, in clear
> File /home3/local/src/Zope-2.1.6-src/lib/python/Shared/DC/ZRDB/DA.py, line
> 408, in __call__
> (Object: sqlDeleteValue)
> File
> /home3/local/src/Zope-2.1.5-src/lib/python/Shared/DC/ZRDB/Aqueduct.py, line
> 186, in _argdata
> (Object: sqlDeleteValue)
> Bad Request: (see above)
>
> --
> 'Life is like boxes of chocolate, Forrest. You never know what you're gonna
> get.' -- Forrest Gump (1994)
> Lo Chung-Chang (shortie) shortie@ms14.hinet.net http://shortie.vbc.com.tw/
> ICQ#27118251
> Kaohsiung.Taiwan.Roc.Earth.Solar.Galaxy.Universe
>
>
> _______________________________________________
> 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 )
--
Anthony Baxter <anthony@interlink.com.au>
It's never too late to have a happy childhood.