[Zope] Zope with Microsoft Access
Chris Gray
cpgray@library.uwaterloo.ca
Thu, 23 Nov 2000 15:56:49 -0500 (EST)
Here's a fix. Change the line:
<dtml-call UpdateHours(REQUEST)>
to:
<dtml-call "UpdateHours(myval=_['myval'], mykey=_['mykey'],
sequence_item=_['sequence-item'])">
and change the name of the parameter in your ZSQL method from
sequence-item to sequence_item and change the dtml-var tag in the method
to <dtml-var sequence_item>.
Cheers,
Chris
On Wed, 22 Nov 2000, Mike Kelland wrote:
> What does <dtml-var "0/0"> actually do? Looks like all it would do is
> divide by zero which *has* to be some kind of error. The problem, I think,
> lies mainly in the arguments being passed to UpdateHours. I have done a
> whole slew of tests to show that my if statement works perfectly (the
> _.string.find thing seems to return false if it finds the specified sub
> string which is odd, but works) and I've actually outputted the correct SQL
> in the DTML (ie displayed it within the page) and I've copied and pasted
> that SQL directly into a ZSQL Method and ran it on my database and that
> works fine. However it seems to do absolutly nothing when I actually
> attempt to run everything together and call UpdateHours from the DTML
> document. I've played a little with namespace as well, but as I said, I'm
> new to all this so there may be an error there.
>
> Thanks for everyone's insight so far, it's really helpful, and please keep
> those suggestions coming! : )
>
> Mike Kelland
> mike@studiomatic.com
>
> ----- Original Message -----
> From: "Dgallion@rochester.rr.com" <darrell@dorb.com>
> To: "Mike Kelland" <mike@studiomatic.com>; <zope@zope.org>
> Sent: Wednesday, November 22, 2000 8:48 PM
> Subject: Re: [Zope] Zope with Microsoft Access
>
>
> > You may not be entering UpdateHours.
> >
> > Try <dtml-var "0/0"> just before the call to UpdateHours.
> > Or some other obvious way to know if your entering it.
> >
> > Here's how I coded the same kind of thing.
> > Although I'm reading the Zope book right now to see how I should have done
> > it.
> > The book is good and I might just learn a better solution than 0/0 :)
> >
> > --- Part of addContact
> > <form action="insertNewContactForm" method="get">
> > <table>
> > <tr><td>Name:</td><td><input type="text" name="name" ></td></tr>
> > <tr><td>Title:</td><td><input type="text" name="title"></td></tr>
> > <tr><td>Phone:</td><td><input type="text" name="phone"></td></tr>
> > </table>
> > <table><tr>
> > <td><input type="submit" name="cmd" value="Insert"></td>
> > <td><input type="submit" name="cmd" value="Update"></td>
> > <td><input type="submit" name="cmd" value="Delete"></td>
> > <td><input type="submit" name="cmd" value="Clear"></td>
> > </tr></table>
> > </form>
> >
> > ---insertNewContactForm
> > <dtml-if expr="_.len(name) > 0">
> > <dtml-if expr="cmd=='Insert'">
> > <dtml-var insertNewContact>
> > <dtml-elif expr="cmd=='Delete'">
> > <dtml-call deleteWhere>
> > <dtml-elif expr="cmd=='Update'">
> > <dtml-call updateWhere>
> > <dtml-elif expr="cmd=='Clear'">
> > </dtml-if>
> > </dtml-if>
> > <dtml-var "RESPONSE.redirect('addContact')">
> >
> > --Darrell
> >
> >
> > _______________________________________________
> > 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 )
> >
> >
>
>
> _______________________________________________
> 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 )
>