Re: [Zope] Zope with Microsoft Access

2000-11-24 Thread Mike Kelland

I actually have this up and running now (as of about 5 minutes ago).  It's a
hack but it works great so I'm not going to mess with it.

Thanks a lot to everyone who gave me pointers, most especially Chris Gray
whose solution fixed it in the end.

Now I need a way of implementing Apache style authentication.  Is there an
easy way to do this?

Thanks!
Mike
[EMAIL PROTECTED]
- Original Message -
From: "Rik Hoekstra" <[EMAIL PROTECTED]>
To: "Mike Kelland" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, November 24, 2000 12:21 PM
Subject: Re: [Zope] Zope with Microsoft Access


>
> > 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 and value is either + 
or -
> > ) and a text field for entering hours to add or
> > subtract (name is mod_hours)).
> >
> > The code (in the DTML document) is:
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> >
> > 
> > 
> > 
> >
> > and the SQL method UpdateHours is:
> >
> > update emp_hours set hours =
> > 
> > 
> > where
> > hoursID = ;
> >
> > 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.
> >
>
> This seems to be more of a DTML problem than an Access problem. It is hard
> to follow anyway...
> A few questions: have you tried using something like changing the form
names
> to using the name.item:records syntax. something like
>
> 
> 
> 
> and a text field for entering hours to add or
> 
>
> this will give your dtml method a dictionary like structure called modify
> you can loop over.
>
> Starting from there will save you a whole lot of hacking. Also I'm not at
> all sure that you can use the [sequenct-key] as arguments for your SQL
> Method.
>
> On the records and types in forms see:
> http://www.zope.org/Members/Zen/howto/FormVariableTypes
>
> hth
>
> Rik
>
>


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Zope with Microsoft Access

2000-11-24 Thread Rik Hoekstra


> 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 and value is either +  or -
> ) and a text field for entering hours to add or
> subtract (name is mod_hours)).
>
> The code (in the DTML document) is:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>
> 
> 
> 
>
> and the SQL method UpdateHours is:
>
> update emp_hours set hours =
> 
> 
> where
> hoursID = ;
>
> 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.
>

This seems to be more of a DTML problem than an Access problem. It is hard
to follow anyway...
A few questions: have you tried using something like changing the form names
to using the name.item:records syntax. something like




and a text field for entering hours to add or


this will give your dtml method a dictionary like structure called modify
you can loop over.

Starting from there will save you a whole lot of hacking. Also I'm not at
all sure that you can use the [sequenct-key] as arguments for your SQL
Method.

On the records and types in forms see:
http://www.zope.org/Members/Zen/howto/FormVariableTypes

hth

Rik


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Zope with Microsoft Access

2000-11-24 Thread Mike Kelland

Hrm... I've tried what you said, but  it still fails to work...

Is there a Zope guru out there who is willing to look over this code in it
entirety (ie the DTML and the ZSQL Method) and work with me directly to try
to get this working?

Thanks,
Mike
[EMAIL PROTECTED]

- Original Message -
From: "Chris Gray" <[EMAIL PROTECTED]>
To: "Mike Kelland" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 23, 2000 3:56 PM
Subject: Re: [Zope] Zope with Microsoft Access


> Here's a fix.  Change the line:
>
> 
>
> to:
>
>  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 .
>
> Cheers,
> Chris
>
> On Wed, 22 Nov 2000, Mike Kelland wrote:
>
> > What does  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
> > [EMAIL PROTECTED]
> >
> > - Original Message -
> > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > To: "Mike Kelland" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Wednesday, November 22, 2000 8:48 PM
> > Subject: Re: [Zope] Zope with Microsoft Access
> >
> >
> > > You may not be entering UpdateHours.
> > >
> > > Try  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
> > > 
> > > 
> > > Name:
> > > Title:
> > > Phone:
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > ---insertNewContactForm
> > > 
> > >  
> > >
> > >  
> > >   
> > >  
> > >   
> > >  
> > >  
> > > 
> > > 
> > >
> > > --Darrell
> > >
> > >
> > > ___
> > > Zope maillist  -  [EMAIL PROTECTED]
> > > 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  -  [EMAIL PROTECTED]
> > 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  -  [EMAIL PROTECTED]
> 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  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Zope with Microsoft Access

2000-11-23 Thread Chris Gray

Here's a fix.  Change the line:



to:



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 .

Cheers,
Chris

On Wed, 22 Nov 2000, Mike Kelland wrote:

> What does  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
> [EMAIL PROTECTED]
> 
> - Original Message -
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> To: "Mike Kelland" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, November 22, 2000 8:48 PM
> Subject: Re: [Zope] Zope with Microsoft Access
> 
> 
> > You may not be entering UpdateHours.
> >
> > Try  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
> > 
> > 
> > Name:
> > Title:
> > Phone:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > ---insertNewContactForm
> > 
> >  
> >
> >  
> >   
> >  
> >   
> >  
> >  
> > 
> > 
> >
> > --Darrell
> >
> >
> > ___
> > Zope maillist  -  [EMAIL PROTECTED]
> > 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  -  [EMAIL PROTECTED]
> 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  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Zope with Microsoft Access

2000-11-22 Thread [EMAIL PROTECTED]

From: "Mike Kelland" <[EMAIL PROTECTED]>
> What does  actually do?  Looks like all it would do is
> divide by zero which *has* to be some kind of error.  

Yelp, that's exactly what it does.
My goal was to prove one way or another that a bit of code was executed.
Divide by zero is one way to do that.

--Darrell


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Zope with Microsoft Access

2000-11-22 Thread Mike Kelland

What does  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
[EMAIL PROTECTED]

- Original Message -
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: "Mike Kelland" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 22, 2000 8:48 PM
Subject: Re: [Zope] Zope with Microsoft Access


> You may not be entering UpdateHours.
>
> Try  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
> 
> 
> Name:
> Title:
> Phone:
> 
> 
> 
> 
> 
> 
> 
> 
>
> ---insertNewContactForm
> 
>  
>
>  
>   
>  
>   
>  
>  
> 
> 
>
> --Darrell
>
>
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> 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  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Zope with Microsoft Access

2000-11-22 Thread [EMAIL PROTECTED]

You may not be entering UpdateHours.

Try  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


Name:
Title:
Phone:









---insertNewContactForm

 
   
 
  
 
  
 
 



--Darrell


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Zope with Microsoft Access

2000-11-22 Thread Chris Gray

Isn't the problem your else tags?  Remove them and I think you'll get the
effect you wanted.  As it stands the condition:



is never true.

Chris

On Wed, 22 Nov 2000, Mike Kelland wrote:

> 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 and value is either +  or -
> ) and a text field for entering hours to add or
> subtract (name is mod_hours)).
> 
> The code (in the DTML document) is:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> and the SQL method UpdateHours is:
> 
> update emp_hours set hours =
> 
> 
> where
> hoursID = ;
> 
> 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
> [EMAIL PROTECTED]
> 
> 
> ___
> Zope maillist  -  [EMAIL PROTECTED]
> 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  -  [EMAIL PROTECTED]
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] Zope with Microsoft Access

2000-11-22 Thread Mike Kelland

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 and value is either +  or -
) and a text field for entering hours to add or
subtract (name is mod_hours)).

The code (in the DTML document) is:





















and the SQL method UpdateHours is:

update emp_hours set hours =


where
hoursID = ;

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
[EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
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 )