title: Error when calling a procedure from pyodbc
body: <p>This is my first question here. So, I am sorry if it is repeated or the formatting is off. I searched through other questions and the error is common but appears on multiple situations.</p>
  
  <p>I have a very simple python code where I want to execute a procedure in MSSQL from pyodbc. </p>
  
  <pre><code>import pyodbc
  conn = pyodbc.connect(r'DSN=myDSN')
  cursor = conn.cursor()
  query = r'{call myproc}'
  cursor.execute(query)
  </code></pre>
  
  <p>I am using call instead of exec after reading that ODBC uses call for executing procedures in MSSQL. </p>
  
  <p>The error I am getting is the following:</p>
  
  <pre><code>Traceback (most recent call last):
  File "myscript.py", line 26, in &lt;module&gt;
  cursor.execute(query)
  pyodbc.ProgrammingError: ('42000', '[42000] [Microsoft][SQL Server Native Client 11.0][SQL Server]The current transaction has aborted, and any pending changes have been rolled back. Cause: A transaction in a rollback-only state was not explicitly rolled back before a DDL, DML or SELECT statement.  (111233) (SQLExecDirectW)')
  </code></pre>
  
  <p>Thanks for the help</p>