Basic cursor usage - fetchall / fetchone returning List of Tuples instead of Row objects? #65
Replies: 2 comments
-
Hi @chadbaldwin Thank you for connecting with us, appreciate you for using this driver. We are triaging this issue and will revert in a day or two on this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @chadbaldwin We acknowledge issues in the documentation and corresponding intended behavior. We are now in the process of fixing this issue. This will be released in our upcoming release. Necessary changes will be done on the documentation as well. Thank you again for reporting this problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Disclaimer: I am 100% completely new to python, which is why I've posted this as a discussion instead of an issue. But I am a SQL Server developer, so when I saw this new driver announcement, I decided to start learning it.
I installed Python v3.13.3 and
mssql-python
v0.1.6.I'm literally just trying to re-create the samples used in the documentation and they are not working. The query runs fine, I can see data populating into the variable after fetching. But it seems the data type returned by
fetchone
is not matching what the documentation says it should be.I'm running this:
Which results in...
The documentation says that
fetchone()
should return aRow
object, but instead it is returning aTuple
. So when I try to access the attribute by name, it simply fails because it doesn't exist because the object looks like this['SQ', 3]
.So, I understand what I need to do to make this work in regard to accessing the values I need using indexes rather than names. But I don't understand why the fetch commands are returning tuples and lists of tuples instead of this
Row
object?Beta Was this translation helpful? Give feedback.
All reactions