[python-sybase] Error in ct_options
Shai.Berger@integration.sungard.com
Shai.Berger at integration.sungard.com
Sun, 26 Jan 2003 11:13:37 +0200
Hi,
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 =
connection property).
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 =
default.
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,
Shai.
-----Original Message-----
From: Dave Cole [mailto:djc@object-craft.com.au]=20
Sent: Friday, January 24, 2003 15:11
To: Marcos S=E1nchez Provencio
Cc: python-sybase@object-craft.com.au
Subject: Re: [python-sybase] Error in ct_options
> First, thank you for the module in general and for the fast answer in=20
> particular.
>=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)
> ^^^^^^
>=20
> Well, now it connects alright, but I don't get auto-commit off, do I?=20
> I do want standard dbapi behavior.
>=20
> 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?
- Dave
--=20
http://www.object-craft.com.au
_______________________________________________
Python-sybase mailing list
Python-sybase@object-craft.com.au =
https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase