zillow / ctds

Python DB-API 2.0 library for MS SQL Server
MIT License
83 stars 12 forks source link

No way to get executed SQL or sproc output #8

Closed craigahobbs closed 6 years ago

craigahobbs commented 6 years ago
  1. Consider the following script:
import ctds

connection = ctds.connect('localhost', user='sa', password='password')
with connection:
    with connection.cursor() as cursor:
        cursor.execute('''\
print('hello')
print('goodbye')
''')

Question: How do I get the "hello\ngoodbye\n" output?

joshuahlang commented 6 years ago

Currently there is no way to access messages returned to the client. I can update ctds to save these messages and expose them as a property on the connection object.

joshuahlang commented 6 years ago

Fixed in 1.4.0