[Zope-DB] Error when calling Z-SQL-Method in python script,
Please Help?
Qingliang Li
qlli at ctb.pku.edu.cn
Tue Jul 20 09:56:54 EDT 2004
A Z SQL Method named : quick_search_sql (and it contain several
parameters such as ID, Name, Type, Pmd, Description). When I try to call
this method in my script in the following way:
.....
context.quick_search_sql(Pmd= talbl, ID=query, Name=query,
Description=query, Type=query)
.....
It dose not work EXCEPT when the ALL 5 parameters are all in REQUEST
object. I mean I MUST define the all 5 parameters in REQUEST object(the
value of parameters could be null), or it will give nothing back after
my submitting query.
On the other hand, I find a ugly method to make it work. :( I add some
some definitions to the REQUEST.form, It goes like this:
......
request.form['pdm']=table
request.form['ID']=query
request.form['Name']=query
request.form['Description']=query
request.form['Type']=query
context.quick_search_sql(Pmd= talbl, ID=query, Name=query,
Description=query, Type=query)
.....
Anyone could tell me why??
Additionally, I am trying to use ZOPE do some work recently. And I find
this ZOPE-DB community is a wonderful one. A special thanks to Dieter
for so many kindly reply. Thanks every much!
--
Qingliang Li
Center for Theoretical Biology,
Peking University, Beijing,
P.R.China, 100871
Email: qlli at ctb.pku.edu.cn
Tel: +86-010-6275-9669
More information about the Zope-DB
mailing list