Dear Martin

If you build your form with formulator, formulator add a prefix (field_variablename) to your variable. You need to use:
<dtml-call "YourForm.validate_all_to_request(REQUEST)">  to remove the prefix (field_) before updating your database. Plesae read formulator help to see more examples.

You can try using "<dtml-var REQUEST>" to see your form variables.

Good luck.


Martin Koekenberg <[EMAIL PROTECTED]> wrote:
 Hello Thomas,
Thanks for your response.
Onthis moment my databse writing is based on DTML.
The problem is that when I test this Z MySQL Method it's working.
ID = 1234567894,
voornaam = 'Martin',
achternaam = 'Koekenberg'

Everything is writen in the database.
Now the following....
I submit a form (build with formulator).
The action point to a dtml Method witch calls the above Z MySQL Method (dtml-call write_user).
Nothing is happening........
I'm doing something wrong, but what......
The next step is to remove the valuea and replace them with a <dtml-sqlvar ..........
and replace the <dtml-call write_user with <dtml-call write_user(field_id,field_voornaam,field_acyternaam
Can you help me withe the next step.... I't the first time that I use MySQL/Zope and Z MySQL Method.
Martin Koekenberg
-----Original Message-----
From: Thomas Bennett <[EMAIL PROTECTED]>
Date: Fri, 26 May 2006 09:16:24 -0400
Subject: Re: [Zope] Z SQL Method question

With a lack of information here I'll answer based fully on assumption based on

 In your form the action should go to a dtml method.

<form action="" ...>

The dtml method should have a call to your Z SQL Method

<dtml-call my_sql_method>

And then you can add anything in the dtml method which will be viewed as the
response page to the user that submitted the form.  You can also do some
validation here if needed, with conditional statements.   I usually add a
redirect under the dtml-call to go to a different response page to the user
because if the user reloads the page with the dtml-call it will send the data
to the database again unless there is a conflict like unique fields etc..


Are you using ZPT?


On Friday 26 May 2006 08:54, Martin Koekenberg wrote:
> Hello,
> Who has experience with Z SQL Method.
> I Created a from to enten some data into MySQL server. I used Z SQL Method
> to write the dat into the databse. Everytime I submit the form I get a
> screen with the field in my Z SQL Method component.
> How can I write the dat from a form into my database at once by using Z SQL
> Method ?
> I tested the database connetion, that is working.
> Regards,
> Martin Koekenberg

Thomas McMillan Grant Bennett      Appalachian State University
Computer Consultant III         P O Box 32026
University Library            Boone, North Carolina 28608
(828) 262 6587

An important measure of effort in coding is the frequency with which you write
something that doesn't actually match your mental representation of the
problem, and have to backtrack on realizing that what you just typed won't
actually tell the language to do what you're thinking. -Eric Raymond

Library Systems Help Desk:
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )
Zope maillist -
** No cross posts or HTML encoding! **
(Related lists - )

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to