[SQLObject] MSSQL with Pymssql: Commit without Begin Transaction
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Tim L. <tla...@tc...> - 2005-11-21 14:56:59
|
I am unable perform insert operations when using the pymsql and the new mssql module in 0.8dev. I am able to perform select operations successfully. The problem on insertion appears to be that the module is not issuing a "begin" transaction before it tries to "commit". Here's the stack trace: ------------------------------------ Traceback (most recent call last): File "c:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg\cherrypy\_cphttp tools.py", line 271, in run main() File "c:\python24\lib\site-packages\CherryPy-2.1.0-py2.4.egg\cherrypy\_cphttp tools.py", line 502, in main body =3D page_handler(*args, **cherrypy.request.paramMap) File "C:\Python24\lib\site-packages\cherrymvc\_dispatcher.py", line 41, in index view, viewParams =3D controller.execute(request, cherrypy.response) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pa ckages/cherrymvc/_controllers.py", line 26, in execute File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pa ckages/cherrymvc/_controllers.py", line 39, in processFormSubmission File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pa ckages/cherrymvc/_controllers.py", line 63, in onSubmit File "test.py", line 72, in doSubmitAction Slot(**form_result) # database insert File "c:\python24\lib\site-packages\SQLObject-0.8dev-py2.4.egg\sqlobject\main .py", line 1227, in __init__ self._create(id, **kw) File "c:\python24\lib\site-packages\SQLObject-0.8dev-py2.4.egg\sqlobject\main .py", line 1256, in _create self._SO_finishCreate(id) File "c:\python24\lib\site-packages\SQLObject-0.8dev-py2.4.egg\sqlobject\main .py", line 1280, in _SO_finishCreate id, names, values) File "c:\python24\lib\site-packages\SQLObject-0.8dev-py2.4.egg\sqlobject\dbco nnection.py", line 357, in queryInsertID return self._runWithConnection(self._queryInsertID, soInstance, id, names, values) File "c:\python24\lib\site-packages\SQLObject-0.8dev-py2.4.egg\sqlobject\dbco nnection.py", line 219, in _runWithConnection self.releaseConnection(conn) File "c:\python24\lib\site-packages\SQLObject-0.8dev-py2.4.egg\sqlobject\dbco nnection.py", line 261, in releaseConnection conn.commit() File "C:\Python24\lib\site-packages\pymssql.py", line 244, in commit self.__cnx.query("commit tran") error: SQL Server message 3902, state 1, severity 16: The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION. I'm using the latest version of Pymsssql (0.7.3) Tim Langeman Manheim, PA (USA) _________________________ TCW Computers has opened a second location to serve you, TCW East.=20 TCW East is a computer repair facility for convenient carry-in service.=20 The new office is located at 1920 Lincoln Highway East, Lancaster.=20 Phone: 717-653-2700. _________________________ ** CONFIDENTIAL ** This email communication is intended only for the one to whom it is = addressed, and may be privileged, confidential and exempt from = disclosure. If you are not that addressee or responsible for delivery to the = addressee, any dissemination of this communication is prohibited. If you = received this email in error please reply to the sender. Thank you. |