[Zope-DB] Wierd rollback problem in mxODBC DA

Matthew T. Kromer matt at bane.mi.org
Thu Oct 21 08:01:47 EDT 2004

Phil, if I had to guess at it, I'd think you're seeing some kind of 
glitch in your actual database, most likely having to do with how 
independent transactions view each other when run concurrently.

You didn't list your target database type, nor your code, so I cant 
guess any further.

I would be surprised if mxODBC were the culprit; the symptoms you 
describe usually have to do with understanding the nuances of your 
target database and how Zope actually drives the adapter.

For example, are you sure the SQL method which queries the table isn't 
caching the results?   There's a cache tab which controls this; the 
result cache is unaware of any updates you may do which would 
invalidate the cache.  Not caching is the default behavior, but if you 
turned caching on you could be bitten by this.

On Oct 21, 2004, at 4:56 AM, Philip Kilner wrote:

> Hi List,
> I have a problem which may or may not be mODBC DA related. The target 
> database is MS SQL Server 2000.
> A script which calls a ZSQL method which inserts records into a table 
> from data in a view was reported to be running without error but 
> having no effect.
> On testing the ZSQL method in isolation, the results set returned the 
> appropriate number of records, complete with identity field data. On 
> reviewing the table, the records were not there but the counter for 
> the identity field indicated that the numbers in question had been 
> allocated.
> As far as I can determine, this must be a failed transaction which is 
> being rolled back (But should I see a result dataset in the ZSQL 
> method if this were the case?). However, I see no error indicating the 
> reason for the failure, and when the identical code to that in the 
> ZSQL method was run as a stored procedure, the process ran as intended 
> (e.g. the transaction was not rolled back).
> How can I figure out if I am right about the roll back, and identify 
> the reason for the difference in behaviour of the same script in the 
> two different locations?
> I do not now have a failing data set - subsequent batches of data were 
> processed as intended, using the ZSQL Method.
> -- 
> Regards,
> PhilK
> Email: phil at xfr.co.uk / Voicemail & Facsimile: 07092 070518
> "Work as if you lived in the early days of a better nation." - 
> Alasdair Gray
> _______________________________________________
> Zope-DB mailing list
> Zope-DB at zope.org
> http://mail.zope.org/mailman/listinfo/zope-db

More information about the Zope-DB mailing list