[python-sybase] Error in ct_options
Shai.Berger at integration.sungard.com
Sun, 26 Jan 2003 11:13:37 +0200
The Sybase equivalent of 'set implicit_transactions on' is 'set chained =
on'. This might work on MSSQL too -- I don't have one on me... But you =
may still activate the feature in very similar ways (executing a =
statement) rather than very different ones (statement vs. setting a =
In any case, I think if you fail to set up chained transactions you =
should definitely not "just ignore it quietly"; this would be very =
un-pythonic. You should let the user allow it to be quietly ignored, or =
have an option to explicitly connect in auto-commit mode, but not as =
Having a connection succeed, but use a subtly different semantics than =
the user expects (because of the DBAPI spec, and the fact that =
Sybase/MSSQL do support chained mode), is just asking for trouble.
My 2 cents,
From: Dave Cole [mailto:firstname.lastname@example.org]=20
Sent: Friday, January 24, 2003 15:11
To: Marcos S=E1nchez Provencio
Subject: Re: [python-sybase] Error in ct_options
> First, thank you for the module in general and for the fast answer in=20
> I suppose you meant=20
> - if status !=3D CS_SUCCEED:
> - self._raise_error(Error, 'ct_options')
> + self.auto_commit =3D (status !=3D CS_SUCCEED)
> Well, now it connects alright, but I don't get auto-commit off, do I?=20
> I do want standard dbapi behavior.
> Would it be ok to just execute
> c.execute('set implicit_transactions on') on the connection?
Does anyone know if there is a standard way to disable auto commit on =
both Sybase and SQL Server?
Python-sybase mailing list