[Zope] Zope with Microsoft Access

Mike Kelland mike@studiomatic.com
Wed, 22 Nov 2000 19:37:13 -0500


Hi, this is my first posting to the list, and about my 4th day working with
Zope.  I have a bit of a problem.  All my code so far is working well.  Just
the following section is defying my attempts to make it run.  What it does
is to update a field in the database (to allow employees to quickly update
their hours in the hours tracking thing I'm creating)  it's complex since
all the employees hours will be listed on one page and will be instantly
updatable (with a select box that allows the choice of +/- (name is
modify<dtml-var hoursID> and value is either + <hours already input> or -
<hours already input>) and a text field for entering hours to add or
subtract (name is mod_hours<dtml-var hoursID>)).

The code (in the DTML document) is:

<dtml-in "REQUEST.form.items()">
<dtml-if "_.string.find(_['sequence-key'], 'mod_hours')">
<dtml-else>
<dtml-let mykey=sequence-key myval=sequence-item>
<dtml-in "REQUEST.form.items()">
<dtml-if "_.string.find(_['sequence-key'], 'modify')">
<dtml-else>
<dtml-if "_['sequence-key'][6:9] == mykey[9:12]">
<dtml-if myval>
<dtml-call UpdateHours(REQUEST)>
</dtml-if>
</dtml-if>

</dtml-if>
</dtml-in>

</dtml-let>
</dtml-if>
</dtml-in>

and the SQL method UpdateHours is:

update emp_hours set hours =
<dtml-var expr="_['sequence-item']">
<dtml-var expr="_['myval']">
where
hoursID = <dtml-var expr="_['mykey'][9:12]">;

with arguments: sequence-item, myval, mykey

I've tried everything I can think of but it not only refuses to do anything,
it also refuses to raise an error.

If anyone can help out I'd be very grateful.

Thanks
Mike Kelland
mike@studiomatic.com