[Zope-DB]found reason: sql query works in database connector but not in ZSQL method

robert rottermann robert at redcor.ch
Fri Jan 19 11:50:27 EST 2007

Hash: SHA1

Maciej Wisniowski schrieb:
>> I do only read data to display and do not store it. do you still think
>> that could affect integrity.
> As far as I understand you're creating new connection in
> python (External method or product) to call some queries
> on it and to read data. You're also using ZSQLMethod in Zope
> to call procedures that modify data. Yes?
> I don't know the order of these actions but suppose that:
> 1. You call a procedure (with Zope machinery) that modified some data
> 2. You call query 'from python' to get these data
> 3. Your results are incorrect because you're using different
> database connections, and commit was not done yet (at last Zope
> commits 'automatically' at the end of request).
> But maybe this is not your case.
it in deed seems not to work.
however I do not understand why.

This is now academical as I resolved to not to use stored procedures
that return a record set (tough its a pain in the back).

what I do (did):
1. write data (in a ZSQL connction), did commit it, did flush the table.
(reading from plain mysql shows the data)
2. in a "python modoul" I
 - flush the tables (to force a reread)
 - read the data
 - send it to plone to display

unfortunately I get stale data.

As we need to go online next week, I resolved to not to use Stored
Procedure to retrieve the data.
However I really like to know why I cant.


Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org


More information about the Zope-DB mailing list