[Zope] Pass Arguments to ZSQL Method from Python Script
Grace, Mark
Mark.Grace@imd.ch
Mon, 3 Mar 2003 15:39:46 +0100
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=E4sten [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 =3D context.zsql_method_name(emp_id=3Dsomeval, =
first=3Dsomeval2,
last=3Dsomeval3, salary=3Dsomeval4)
or
results =3D 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 -=20
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )