[Zope] Non-query SQL with Zope (naive question)

Martijn Pieters mj@antraciet.nl
Tue, 24 Aug 1999 17:56:06 +0200


At 16:49 24-8-99 , Bruce Elrick wrote:
>By the way, in your message you showed this way of calling the SQL Method:
>
>   <!--#call "insertNewContact(name='Martijn Pieters', 
>email='mj@antraciet.nl')"-->
>
>Is that equivalent to the browser doing 
>http://site.com/path/to/method/insertNewContact?name=Matin+Pieters?email=mj@
>antraciet.nl

No, but the REQUEST.set does do the same.

You would do better setting the target of the form to a DTML Method that
does the call to your SQL method, because that way you can give custom
feedback.

Let's assume you still have that you still have the insertNewContact method.

Now you also have a insertNewContactForm DTML Document:

  <!--#var standard_html_header-->
  <FORM ACTION=insertNewContactAction>
    <INPUT TYPE=text NAME=name>
    <INPUT TYPE=text NAME=email>
    <INPUT TYPE=submit>
  </FORM>
  <!--#var standard_html_footer-->

and you have a insertNewContactAction DTML Method:

  <!--#var standard_html_header-->
  <!--#call insertNewContact-->
  New contact has been added to the database.
  <!--#var standard_html_footer-->


-- 
Martijn Pieters, Web Developer 
| Antraciet http://www.antraciet.nl 
| T: +31 35 7502100 F: +31 35 7502111 
| mj@antraciet.nl http://www.antraciet.nl/~mj 
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 
---------------------------------------------