[egenix-users] mxODBC Connect integration with SQLAlchemy
mal at egenix.com
Tue Aug 19 19:42:26 CEST 2014
On 19.08.2014 15:19, Baiju M wrote:
> Can I use mxODBC Connect with SQLAlchemy ?
> Is there any documentation on this ?
It should be possible to reuse the existing mxODBC support in SQLAlchemy
for mxODBC Connect as well, but we have not looked into this yet:
Here's an example of how to use the mxODBC Connect Client (section 4.3
of the documentation):
>From looking at the SA code, a couple of changes seem to be necessary:
* class methods need to be adapted to open the server connection
to mxODBC Connect Server
* error handler has to be replaced with a conn.warningformat =
self.dbapi.WARN_WARNINGFORMAT or .IGNORE_WARNINGFORMAT
Note that warnings will be emitted on the server, not the client
side if you use .WARN_WARNINGFORMAT.
* some session cleanup code will have to be added to close down
the server session when it is no longer needed to free up
Apart from that, the code should work with mxODBC Connect as well.
Professional Python Services directly from the Source (#1, Aug 19 2014)
>>> Python Projects, Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
2014-09-19: PyCon UK 2014, Coventry, UK ... 31 days to go
::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::
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