[Zope] Very Strange problem with Z SQL or ??

Oliver Marx Oliver@tekk.dk
Fri, 20 Sep 2002 10:18:51 +0200


I use this structure
ZPT -> Python Script -> Z SQL

I create a new object in the database (pg).

First I do the nextval dance. I get the correct ID back.

Armed with this ID I insert my data. Data is correct inserted.

Now I use the ID to select data from the DB, so the user can see the 
object created. This Z SQL object works perfectly when I test it. But 
when I use it in my python script - it returns empty every second time!?

That is first it returns empty, but if I refresh the page once more the 
correct data is displayed.

My first idea was that the browser cached the pages - but this is not 
the case. I can test this by printing the object_id on the page. No 
caching done here.

If I in the python script hard code a object_id this object is returned 
correctly. With this notion in mind I started testing the value of 
object_id just before I call the Z SQL object.

object_id != None and object_id != '' and object_id > 0

object_id is an integer greater than 0.

So what do I do now? Any suggestions? Need more information?


Thanks for your time..

\Oliver