[Zope-DB] Wierd rollback problem in mxODBC DA
charlie at egenix.com
Thu Oct 21 06:15:23 EDT 2004
I've cc'd this to the egenix-users list as not many people seem to know it
If you suspect that mxODBC is somehow responsible then you should try the
call externally and then as an ExternalMethod. The mxODBCZopeDA essentially
passes most of the work to the mxODBC driver with the intelligence going
into managing threads and transactions. Should the problem be traceable to
mxODBC we could provide a debugging version of the driver but I suspect
this is _not_ the case. It is more likely to be in the transactional
machinery so you need to enable Zope's debugging.
On 2004-10-21 at 10:56:41 [+0200], Philip Kilner <phil at xfr.co.uk> 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.
Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the Zope-DB