[egenix-users] Impossible to correct execute stored procedure using cursors

Sirio Capizzi sirio.capizzi at prometeia.it
Wed Nov 5 12:45:53 CET 2008

Yes, the if clause is intended and the problem doesn't depend on it. The 
problem is that each time you execute the stored procedure you got a 
different numer of rows even if the procedure uses the same set of data. 
The python script we are using is the following:

import mx.ODBC.Windows
from mx.ODBC.Windows import SQL


cur = conn.cursor()


The version of the  SQL Server ODBC driver is  2000.85.1132.00

> On 2008-11-05 09:50, Sirio Capizzi wrote:
> >/ Hi all,
> />/ we have a problem using egenix mxODBC with a stored procedure using
> />/ cursors. The scenario is the following: a Windows XP based client tries
> />/ to call a stored procedure on a Microsoft SQL Server 2000 using python
> />/ 2.5 and mxODBC 3.0.2. The procedure simply copies all the rows of a
> />/ table to another one using cursors. The call succeeds but a random numer
> />/ of rows are copied instead of the full table. 
> /
> See below - there's an IF clause there that applies filtering.
> >/ We have tried with
> />/ execute, executedirect and callproc. Execute and executedirect complete
> />/ but only a random number of rows are copied. Callproc crashes and a
> />/ windows error report dialog pops up saying that an error occured in
> />/ mxodbc.pyd. 
> /
> Could you send us the Python script (or snippet) you used to trigger the
> segfault ?
> Segfaults in mxODBC itself are rare - segfaults in the underlying
> ODBC driver unfortunately not, but we always try to add work-arounds
> for these buggy drivers if possible, so feedback is appreciated.


Prometeia SpA
Via G. Marconi, 43
40122 Bologna

More information about the egenix-users mailing list