[Zope] Update a database from a FORM gives missing input variable

David Hassalevris bluepaul@bluepaul.com
Thu, 14 Jun 2001 21:57:05 -0700


Neil,
Did you define "Surname" in the Arguments section of your zSql form?

David



neil_b@yahoo.co.uk wrote:
> 
> I am close to getting a form to update a database, but I seem to have
> misunderstood how ZSQLMethod gets variables:
> 
> The Form:
> 
> <form action="update_table">
> <input type="hidden" name="PeopleID" value="9999">
> <input type="text" name="Surname" value="">
> <INPUT type="submit" value="save" name="submit">
> </form>
> 
> The action method:
> 
> <dtml-call sql_update_tblPeople>
> 
> Finally the ZSQLMethod (no arguments set):
> 
> UPDATE tblPeople SET tblPeople.Surname = <dtml-sqlvar Surname
> type="string">
> WHERE tblPeople.PeopleID = <dtml-sqlvar PeopleID type="int">
> 
> >From all the documentation and How-tos I have read so far, this
> should work, but I get:
> 
> missing input variable Surname
> 
> Changing the update_table method to:
> 
> <dtml-var Surname>
> 
> shows that the form delivers the right value.
> 
> Can anyone help me to spot my silly error?
> 
> TIA
> 
> Neil
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )