[egenix-users] egenix mxodbc 3.3.1 and SQLAlchemy
raghavan.vinay at gmail.com
Wed Apr 15 22:08:16 CEST 2015
Has anyone got egenix 3.3.X to work with recent versions of SQLAlchemy
(0.8.X / 0.9.X) ?
With egenix mxodbc 3.3.1 (mx base 3.2.8) we are facing troubles when
SQLAlchemy 0.7.6, as the ORM
unixODBC 2.3.0, as the driver manager
FreeTDS 0.82 or Microsoft ODBC Driver 11 for SQL Server on Linux (
the db drivers
Update statements end up throwing StaleDataError. Has anyone encountered
StaleDataError with latest egenix mxodbc and resolved it; and with which
version of SQLAlchemy?
When digging further, with respect to the StaleDataError, a snippet seems
to have this condition (
394 if value_params:
395 c = connection.execute(
399 c = cached_connections[connection].\
400 execute(statement, params)
411 rows += c.rowcount
412 if connection.dialect.supports_sane_rowcount:
413 if rows != len(update):
414 raise orm_exc.StaleDataError(
415 "UPDATE statement on table '%s' expected to "
416 "update %d row(s); %d were matched." %
417 (table.description, len(update), rows))
pdb shows that connection.dialect.supports_sane_rowcount is set to True
since it is not overridden otherwise for mxodbc dialect. Is this proper? I
got this doubt since it is explicitly set otherwise in dialect for pymssql (
Looking at the history, (
) not many changes have happened after egenix mxodbc 3.2.1 certified for
SQLAlchemy 0.8.0b1 (
Right now, few of our team members are using FreeTDS and few others using
MS ODBC driver. The mentioned error is seen with either of these drivers.
Upgrading to a newer version of SQLAlchemy 0.9.X causes even selects to
fail, which seems to be a bigger concern.
Please share any inputs which you may have about the combination of
unixODBC, FreeTDS, SQLAlchemy and egenix mxodbc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the egenix-users