Dear Martin<br> <br> If you build your form with formulator, formulator add a prefix (field_variablename) to your variable. You need to use:<br> <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.<br> <br> You can try using "<dtml-var REQUEST>" to see your form variables.<br><br>Good luck.<br><br>CY<br><br><b><i>Martin Koekenberg <martin@digital-adventures.nl></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style title="table borders">.htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;} </style> <style type="text/css">html, body { border: 0px; } span.macro, span.macro ul, span.macro div, span.macro p {background : #CCCCCC;} </style>
<style type="text/css"> p{margin-bottom: 0.15em;margin-top: 0.15em;}body{font-family:tahoma;font-size:10pt;}; </style> <font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt; font-family: tahoma;"> Hello Thomas,</font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt; font-family: tahoma;">Thanks for your response.</font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt; font-family: tahoma;"> </font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div> <font style="font-size: 10pt; font-family: tahoma;">Onthis moment my databse writing is based on DTML.</font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div> <font style="font-size: 10pt; font-family: tahoma;"> </font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt;
font-family: tahoma;">The problem is that when I test this Z MySQL Method it's working.</font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt; font-family: tahoma;"> </font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt; font-family: tahoma;">Arguments:</font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div> <font style="font-size: 10pt; font-family: tahoma;">ID:int=1<br>voornaam:string=""<br>achternaam:string=""</font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div> <font style="font-size: 10pt; font-family: tahoma;"> </font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt; font-family: tahoma;">Query:</font></div><font style="font-size: 10pt; font-family: tahoma;"> </font><div><font style="font-size: 10pt; font-family: tahoma;">INSERT INTO users
SET<br>ID = 1234567894,<br>voornaam = 'Martin',<br>achternaam = 'Koekenberg'<br></font> <br>Everything is writen in the database.</div> <div> </div> <div>Now the following....</div> <div>I submit a form (build with formulator).</div> <div>The action point to a dtml Method witch calls the above Z MySQL Method (dtml-call write_user).</div> <div> </div> <div>Nothing is happening........</div> <div> </div> <div>I'm doing something wrong, but what......</div> <div> </div> <div>The next step is to remove the valuea and replace them with a <dtml-sqlvar ..........</div> <div>and replace the <dtml-call write_user with <dtml-call write_user(field_id,field_voornaam,field_acyternaam</div> <div> </div> <div>Can you help me withe the next step.... I't the first time that I use MySQL/Zope and Z MySQL Method.</div> <div> </div> <div>Regards,</div> <div> </div> <div>Martin Koekenberg</div> <blockquote style="border-left: 2px solid
rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">-----Original Message-----<br>From: Thomas Bennett <bennetttm@appstate.edu><br>To: zope@zope.org<br>Date: Fri, 26 May 2006 09:16:24 -0400<br>Subject: Re: [Zope] Z SQL Method question<br><br> <div style="font-family: monospace,courier new,courier;"> With a lack of information here I'll answer based fully on assumption based on <br>dtml. <br><br> In your form the action should go to a dtml method.<br><br><form action="optional_path_to/some_method" ...><br><br> The dtml method should have a call to your Z SQL Method<br><br><dtml-call my_sql_method><br><br>And then you can add anything in the dtml method which will be viewed as the <br>response page to the user that submitted the form. You can also do some <br>validation here if needed, with conditional statements. I usually add a <br>redirect under the dtml-call to go to a different response
page to the user <br>because if the user reloads the page with the dtml-call it will send the data <br>to the database again unless there is a conflict like unique fields etc..<br><br> or<br><br>Are you using ZPT?<br><br>Thomas<br><br>On Friday 26 May 2006 08:54, Martin Koekenberg wrote:<br>> Hello,<br>><br>> Who has experience with Z SQL Method.<br>> I Created a from to enten some data into MySQL server. I used Z SQL Method<br>> to write the dat into the databse. Everytime I submit the form I get a<br>> screen with the field in my Z SQL Method component.<br>><br>> How can I write the dat from a form into my database at once by using Z SQL<br>> Method ?<br>> I tested the database connetion, that is working.<br>><br>> Regards,<br> ><br>> Martin Koekenberg<br><br>-- <br> ====================================================================<br> Thomas McMillan Grant Bennett Appalachian State
University<br>Computer Consultant III P O Box 32026<br>University Library Boone, North Carolina 28608<br>(828) 262 6587<br><br>An important measure of effort in coding is the frequency with which you write <br>something that doesn't actually match your mental representation of the <br>problem, and have to backtrack on realizing that what you just typed won't <br>actually tell the language to do what you're thinking. -Eric Raymond<br><br>Library Systems Help Desk: <a target="_blank" href="http://linux.library.appstate.edu/help"> http://linux.library.appstate.edu/help</a><br> ====================================================================<br> _______________________________________________<br>Zope maillist - Zope@zope.org<br><a target="_blank" href="http://mail.zope.org/mailman/listinfo/zope"> http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross
posts or HTML encoding! **<br>(Related lists - <br> <a target="_blank" href="http://mail.zope.org/mailman/listinfo/zope-announce"> http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a target="_blank" href="http://mail.zope.org/mailman/listinfo/zope-dev"> http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></div></blockquote> _______________________________________________<br>Zope maillist - Zope@zope.org<br>http://mail.zope.org/mailman/listinfo/zope<br>** No cross posts or HTML encoding! **<br>(Related lists - <br> http://mail.zope.org/mailman/listinfo/zope-announce<br> http://mail.zope.org/mailman/listinfo/zope-dev )<br></blockquote><br><p> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com