Calvin Parker wrote:
> > > Error Type: Bad Request
> > > Error Value: ['Field1', 'Field2']
> > >
> > > Here is the code I used and sqlTest is the ZSQL Method that
> > just inserts the
> > > two fields into a test DB:
> > >
> > > <dtml-in testlist>
> > > <dtml-call sqlTest>
> > > </dtml-in>
> > >
> > > What am I doing wrong?
> > >
> >
> > you'll have to feed a named argument to your Zsql method (that is in its
> > definition). In this case that would be testlist. Then it should work as
> > expected
> >
> Here is the Z SQL Method.  It takes the arguments Field1 and Field2.

that's where the problem is: in your REQUEST there _are_ no Field1 and
Field2: they are in the testlist (pseudo) dictionary.


Make you method (something like):

<dtml-in testlist>
 INSERT INTO Test_Fields
 <dtml-sqlvar Field1 type=nb optional>,
 <dtml-sqlvar Field2 type=nb optional>


>Am I calling testlist incorrectly?  I have tried forcing the namespace with
>the dtml-with tag, but it doesn't seem to be making any difference.  Are the
>arguments field in the Method what you are refering to when you say named

I think so (terminology is a bit confusing here). ZSQL methods only take
named arguments. There has been quite a bit of threads on this on the
list. SO you might want to search the archives for them.

In this case the named argument would have to be testlist, as this is
the argument REQUEST contains.


Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to