[Twisted-Python] adbapi and pymssql
Alessandro Praduroux
pradu at pradu.it
Fri May 27 01:09:21 MDT 2005
The problem as I recall was related to the fact that a commit() not coupled
with a begin() threw an exception, while all other DBAPI implementations were
resilient to this kind of problem. So I use a slightly modified version of
Sybase (that I'll send to you separately to avoid traffic on the list, if
anyone else is interested I'll post it here too, I lost the original patch
but I have the full package and I'm too lazy to recreate the patch).
A little disclaimer: freetds and thus Sybase.py do not yet implement query
parameters, if you try using them you will get an error until the freetds
people figure out how to implement this. I don't know if the mssql module
implement a workaround for this, Sybase.py doesn't (but it should be fairly
easy to do it in a compatible way).
HTH
Alle 22:53, giovedì 26 maggio 2005, Mike Pelletier ha scritto:
> On Thu May 26 2005 04:34 pm, you wrote:
> > I have a small job scheduling application written with twisted + nevow
> > for one of my customer and the database is MSSQL 2000. I am using the
> > sybase module built against freetds with a very small patch to fix a
> > rollback/commit issue, and it's working without a problem on production
> > servers using adbapi since a year or so.
>
> Thanks a TON! I did not really even know I had an option to choose another
> database module, I thought pymssql would be my only option. But, since
> pymssql seems to be just a thin layer on top of freetds, your solution is
> probably very relevant to my problem.
>
> Could you go into more detail about the rollback/commit issue you
> encountered, and how you dealt with it? I expect the problem probably
> isn't really with Twisted at all. My patch was developed through blind
> thrashing.
>
> Thanks!
>
> Mike.
--
Linux developer & sysadmin
http://www.pradu.it
pradu at pradu.it
More information about the Twisted-Python
mailing list