Understanding conn and cursor object vis-a-vis as_dict

68 views
Skip to first unread message

Larry Weisberg

unread,
Feb 3, 2020, 9:56:00 AM2/3/20
to pymssql
A general question.  If I have code like:
conn = pymssql.connect('serverName', user, pswd, 'dbname')
cursor = conn.cursor(as_dict=True)
cursor.execute("Some SQL")

In the debugger (pyCharm) if I look at either conn or cursor I see a protected attribute called as_dict; however, no matter when I look (at any step in above 3 lines), it is always False.  Why? It does seem to work, in that calls to fetchall() are returning dicts...

What am I missing here?

Thanks,
Larry
Reply all
Reply to author
Forward
0 new messages