RE: [Zope] Pass Arguments to ZSQL Method from Python Script
Hi Dario, OK, everything is working wonderfully now, many thanks to you and Andy. I'll try to challenge you guys a little more next time. Mark -----Original Message----- From: Dario Lopez-Kästen [mailto:dario@ita.chalmers.se] Sent: Monday, March 03, 2003 2:25 PM To: zope@zope.org Subject: Re: [Zope] Pass Arguments to ZSQL Method from Python Script hello, I think Andy meant remove the commas from the ZSQL-method object, e.g. in the edit box of the ZSQL-method it should look like this: Arguments: emp_id first last salary or Arguments: emp_id first last salary in the call to the zsql-method, you have to use commas: results = context.zsql_method_name(emp_id=someval, first=someval2, last=someval3, salary=someval4) or results = context.zsql_method_name(someval, someval2, someval3, someval4) (not 100% sure about this last one, though - caveat empor) HTH, /dario ----- Original Message ----- From: "Grace, Mark" <Mark.Grace@imd.ch> To: "'Andy McKay'" <andy@agmweb.ca> Cc: <zope@zope.org> Sent: Monday, March 03, 2003 11:28 AM Subject: RE: [Zope] Pass Arguments to ZSQL Method from Python Script
Thanks Andy but I did as you say and now it outputs the following error: ---------------------- Error Type Missing Input
Error Message Missing input variable, first
???
-----Original Message----- From: Andy McKay [mailto:andy@agmweb.ca] Sent: Monday, March 03, 2003 11:23 AM To: Grace, Mark Cc: 'zope@zope.org' Subject: Re: [Zope] Pass Arguments to ZSQL Method from Python Script
"insertEmployeeQuery" is a ZSQL method, using a Gadfly DB Connection, that looks like this: ---------------------- Arguments: emp_id, first, last, salary
Try removing the commas from your argument list:
emp_id first last salary -- Andy McKay
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (1)
-
Grace, Mark