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.
 
Arguments:
ID:int=1
voornaam:string=""
achternaam:string=""
 
Query:
INSERT INTO users SET
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.
 
Regards,
 
Martin Koekenberg
-----Original Message-----
From: Thomas Bennett <[EMAIL PROTECTED]>
To: zope@zope.org
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
dtml.

 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..

or

Are you using ZPT?

Thomas

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: http://linux.library.appstate.edu/help
====================================================================
_______________________________________________
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 - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to