[Zope] Unexpected script behavior

Michael Long mlong@datalong.com
Wed, 04 Dec 2002 19:08:00 -0500


Thanks Dieter,

I have two DA instances defined for testing and had not updated one of
the methods to use the correct one. Now all is well.

BTW: / SuSE 7.3 / Zope 2.5 / Postgres 7.1.2 /

--Mike

> Michael Long writes:
>  > I am getting unexpected results from my python script. Here is a
snippet
>  > form the python script:
>  > 
>  >   container.DeletePerson_sql(PersonId=PersonId) --[ZSQL Method]
>  >   ClearPersonDetails()                          --[Python function]
>  >   PersonList = container.GetPersonList_sql()    --[ZSQL Method]
>  >   request.set('PersonList', PersonList)
>  >   return container.ContactTemplate()            --[ZPT]
>  > 
>  > After the person is successfully deleted from the database another call
>  > to the database is made to get a list of people and set that to
>  > 'PersonList'. This variable is then used to render the page. The
problem
>  > is that the deleted person still shows up in the rendered page.
When the
>  > page is called a second time the correct data is shown. I have
validated
>  > that the data is deleted from the database when expected. Why would the
>  > 'PersonList' not have the correct data?
> This looks like your database had a funny transaction concept.
> 
> What database are you using?
> What database adapter?
> Are both ZSQL methods using the same DA instance?
> 
> 
> Dieter
> 
>