[Zope] Trivial problem with sending form variables to an update Zsql met hod..

Peter Borocz P.Borocz@fi.com
Tue, 15 Jan 2002 10:01:47 -0800


Group, I've got a vexingly simple problem that'll probably push up another
level to zope enlightenment. In particular, how to get the variables from a
regular HTML form passed through to a zsql method containing an update
statement>

So, a (paraphrased) simple dtml-document page like this:

<dtml-in zsqlQueryARecord>
  <form action="zsql_UpdateRecord">
     <input name="keyField" type="hidden" value="<dtml-var keyField>">
     <textarea name="contentsField">
        <dtml-var contentsField>
     </textarea>
     <input type="submit">
</form>
<dtml-in>

My zsql_UpdateRecord method looks like:

parms:       keyField contentsField
statement: update mytable 
   set     contentsField=<dtml-sqlvar contentsField type=string>
   where keyField=<dtml-sqlvar keyField type=string>

--> When I replace the form action with a simple dtml page the displays
REQUEST, the entries for these two variables ARE there in the request
namespace with (potentially edited) values from the html form.
--> When I execute/test the update method manually and enter sample data, it
updates fine..
--> Everythings local to take care of any acquisition problems.

--> HOWEVER, when zsql_UpdateRecord is invoked from the dtml-page, the zsql
method pops up the default page asking me for the value of keyField and
contentsField!!! [When I enter them, they flow through fine, not very user
friendly though..]

Searching through lists and docs indicates that updates within the zsql are
no problem, however, I haven't seen an example showing the values coming off
a form. What am I missing to get the zsql update statement to see these form
variables?? 

Thanks in advance..
Peter Borocz
p.borocz@fi.com <mailto:p.borocz@fi.com> 

                 
Content-Type: text/plain;
	charset="iso-8859-1"
 




-------------------------------------------------
PLEASE READ THIS WARNING: All e-mail sent to or from this address will be
received or otherwise recorded by the Fisher Investments  corporate e-mail
system and is  subject to archival, monitoring or review by, and/or
disclosure to, someone other than the recipient.