[egenix-users] egenix mxodbc 3.3.1 and SQLAlchemy

M.-A. Lemburg mal at egenix.com
Mon Jun 22 23:13:47 CEST 2015

On 13.05.2015 13:22, M.-A. Lemburg wrote:
> On 15.04.2015 18:00, M.-A. Lemburg wrote:
>> Hi Vinay,
>> the error you are seeing basically means that the ODBC driver
>> does not return a correct .rowcount value. mxODBC does support
>> .rowcount, but whether it actually works depends on the ODBC
>> driver used to access the database and the database backend
>> itself (several databases don't provide this information,
>> since it is sometimes expensive to calculate).
>> We can look into this, but would have to know which SQL Server
>> version you are using, since different backend version behave
>> differently.
>> Also: Could you send the traceback you are getting. This
>> will have a hint to what .rowcount returns.
>> Do you have example code for the select failure with 0.9.0 ?
>> Note that we do not maintain the SA backend for mxODBC.
>> We do send licenses to Michael Bayer so that he can test
>> with mxODBC (including for the 3.3 release).
> Just as follow-up to this:
> The FreeTDS ODBC driver had an issue supporting .rowcount
> for SELECTs at the time we released 3.2, so the attributes
> was fixed to -1 in order to not cause confusion by returning
> wrong data.
> We will check whether we can reenable the feature for more
> recent FreeTDS driver versions.

Update: We will reenable the cursor.rowcount feature for
FreeTDS 0.91 and later in the upcoming mxODBC 3.3.3 release.

The new release will also contain a number of other FreeTDS
related work-arounds which allow for better interfacing
to VARCHAR and VARBINARY columns.

> The MS ODBC drivers for Windows and Linux only support
> .rowcount for INSERTs and UPDATEs, but not for SELECTs.
> In any case: it you can, please use the MS ODBC driver
> for Linux instead of FreeTDS. The MS driver for Linux
> is much more compatible to the MS driver for Windows
> and provides access to more features than FreeTDS
> at the moment.
> On other platforms, you can also look at mxODBC Connect,
> which allows you to always run with the MS SQL Server driver
> for Windows, regardless of the platform your client is
> using.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jun 22 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
2015-06-16: Released eGenix pyOpenSSL 0.13.10 ... http://egenix.com/go78
2015-06-10: Released mxODBC Plone/Zope DA 2.2.2   http://egenix.com/go76
2015-07-20: EuroPython 2015, Bilbao, Spain ...             28 days to go

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the egenix-users mailing list