[Zope] Form action -> zsql method linkage ? - was Re: [Zope] how to
get detailsof sql.error ?of sql.error ?
Hannu Krosing
hannu@tm.ee
Thu, 09 Dec 1999 23:31:50 +0200
Nitin Borwankar wrote:
>
> Christopher Petrilli wrote:
> >
> > On 12/9/99 3:15 PM, Nitin Borwankar at nitin@borwankar.com wrote:
> >
> > >
> > > I am getting a vanilla sql.error message from Zope when testing a ZSQL
> > > method
> > > The ZSQL method is a single insert statement without any dtml-try/except
> > > wrapper.
> > > How do I get Zope to be a little more verbose about waht the problem is
> >
> > What DA are you using, this is up to the DA to throw genearlly.
> >
> > Chris
> > --
> > | Christopher Petrilli Python Powered Digital Creations, Inc.
> > | petrilli@digicool.com http://www.digicool.com
>
> I am using The ODBC DA with SQL Server 7.0.
> I appear to have solved the original problem so the lack of detail in
> sql.error is no longer an immediate obstacle. But I have hit the next
> one
> and it's very fundamental. How to link a data input form to a ZSQL
> method.
>
> I have a survey form that takes data
> and needs to insert into a database table with columns in 1-1 corr to
> the form field names.
>
> I have a ZSQL method (insert_survey_rec) that does "insert into survey1
> ( <dtml-sqlvar e-mail type=string>,...)"
> The ZSQL method works as tested through it's Zope generated test form.
>
> Now I need to accept form input from my survey form ( survey_form ) and
> give
> a success/failure messge.
>
> When I use the action=insert_survey_rec in the form tag in survey_form,
> on submit I see
> a) no data inserted
> b) Zope returns to me the Zope generated test form for the ZSQL method.
>
> Clearly I need something in between the form and the ZSQL method that I
> am missing.
> What exactly is it ?
You miss another dtml page that does <dtml-call insert_survey_rec> and
also has other things you may want to give back as the visible result of
submitting the page
> Thanks for any help.
>
> Nitin
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> No cross posts or HTML encoding!
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )