[Zope-DB] Error when calling Z-SQL-Method in python script, Please Help?

Dieter Maurer dieter at handshake.de
Wed Jul 21 14:44:58 EDT 2004


Qingliang Li wrote at 2004-7-20 21:56 +0800:
>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.

This should not be necessary!

Call your Z SQL Method with an additional "src__=1" argument.
This will let the call return the generated SQL command rather
than the result of executing this command.

Compare the two SQL commands generated with and without the REQUEST.

Do you see differences?
If necessary, report back.

-- 
Dieter


More information about the Zope-DB mailing list