[Zope] Writing to SQL Databases
Sean McMains
smcmains@nortelnetworks.com
Mon, 19 Jul 1999 14:31:44 -0400
Alas, neither of these options works.
<!--#call addEntry(REQUEST)-->
just does the same thing as my original format. No error, but no change to
the database.
<!--#call addEntry(REQUEST=REQUEST)-->
when I try to submit the change gives me this error:
Invalid attribute name, "addentry(request", for tag <!--#call
addEntry(REQUEST=REQUEST)-->
Any other ideas? Anybody have any samples I can look at that take the
results of a form and put them into a SQL database?
Thanks Ross et al,
Sean
> -----Original Message-----
> From: Ross J. Reedstrom [SMTP:reedstrm@wallace.ece.rice.edu]
> Sent: Monday, July 19, 1999 1:07 PM
> To: McMains, Sean [RICH4:2V64:EXCH]
> Cc: 'zope@zope.org'
> Subject: Re: [Zope] Writing to SQL Databases
>
> On Mon, Jul 19, 1999 at 11:32:01AM -0400, Sean McMains wrote:
> > Hi folks,
> >
> > I've been working with Zope for a month or two now off and on, trying to
> > figure out how to port several of my existing websites to Zope, since it
> > will make my life much easier and more pleasant. (I really am impressed
> with
> > the work you've done, DC folks! Great job!)
> >
> > One area that's giving me fits right now is inserting data into a SQL
> > Database. By working with the existing documentation and sample code,
> I've
> > gotten database connections set up and templates built, but am missing
> > something at the insert phase.
> >
> > Here's the template I'm using:
> >
> > ID: addEntry
> > Arguments: nameField emailField maidenField yearField websiteField
> >
> > Query Template:
> > insert into alumDirectory
> > (ALUMNAME,
> > ALUMEMAIL,
> > ALUMMAIDEN,
> > ALUMYEAR,
> > ALUMWWW
> > )
> > values
> > (<!--#sqlvar nameField type=string-->,
> > <!--#sqlvar emailField type=string-->,
> > <!--#sqlvar maidenField type=string-->,
> > <!--#sqlvar yearField type=string-->,
> > <!--#sqlvar websiteField type=string-->
> > )
> >
> > I've verified that this template works when I use the TEST function. But
> > when I try to call it:
> >
> > <!--#call addEntry.manage_test(REQUEST)-->
> >
>
> <!--#call addEntry(REQUEST)-->
>
> or perhaps
>
> <!--#call addEntry(REQUEST=REQUEST)-->
>
> should do it.
>
> Ross
> --
> Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
> NSBRI Research Scientist/Programmer
> Computer and Information Technology Institute
> Rice University, 6100 S. Main St., Houston, TX 77005