This was a bug in pymssql; it is now fixed in CVS. You can manually checkout mssqldbmodule.c and compile the module if you need the fix now. Sorry for the inconvenience.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If nothing goes wrong it may happen by the end of the month. Which Python version do you use? I'd recommend 2.6 because there may be problem with binaries for older Pythons starting with next release.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using 2.5.4. I don't think everything in my web stack is ready for 2.6 or I would switch.
Do you have instructions anywhere on how to compile the .c file on Windows? I did C years ago and could probably work through it with some rough direction. Do you normally use Ming on Windows?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'll consider providing binaries for 2.4 and 2.5 for some more time. But instead of wasting energy on outdated Python, I'd prefer to start working on support for Python 3.x
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-02-17
It is 2010 and binaries was not recompiled. Btw, where do i find sources?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-02-17
Sources appeared xD. They were hidden.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In pymssql 1.0.2 the following doesn't work when using FreeTDS:
<pre>
>>> import pymssql
>>>
>>> conn = pymssql.connect(host='testdbhost', database='Test')
>>> cursor = conn.cursor()
>>> cursor.execute('SELECT 1; SELECT 2')
>>> cursor.fetchall()
[(1,)]
>>> cursor.nextset()
1
>>> cursor.fetchall()
[]
</pre>
I could be doing this in completely the wrong fashion so feel free to correct me :)
Please try it with _mssql if you can.
>>> import _mssql
>>> conn = _mssql.connect('testdbhost', 'sa', 'test', False, None, 'Test')
>>> conn.execute_query('SELECT 1; SELECT 2')
>>> for row in conn:
... print row
...
{0: 1}
>>> conn.nextresult()
1
>>> for row in conn:
... print row
...
>>>
Same result I think.
>>> import _mssql
>>> conn = _mssql.connect('testdbhost', 'sa', 'test', False, None, 'Test')
>>> conn.execute_query('SELECT 1; SELECT 2')
>>> for row in conn: print row
>>> for row in conn: print row
This should work; after reading one result set _mssql / pymssql automatically advances to the next (if any).
Running that code yields the same result as the other 2 methods.
I've tried specifying different versions of tds in freetds.conf but that doesn't change anything.
Here is the freetds debug log if that'll be any help?
http://pastebin.com/f2e1370da
This was a bug in pymssql; it is now fixed in CVS. You can manually checkout mssqldbmodule.c and compile the module if you need the fix now. Sorry for the inconvenience.
No need to be sorry at all, thanks for all the great work improving pymssql!
> This was a bug in pymssql; it is now fixed in CVS.
Any chance we could get a new release? I am using Windows and do not have a compiler.
If nothing goes wrong it may happen by the end of the month. Which Python version do you use? I'd recommend 2.6 because there may be problem with binaries for older Pythons starting with next release.
I am using 2.5.4. I don't think everything in my web stack is ready for 2.6 or I would switch.
Do you have instructions anywhere on how to compile the .c file on Windows? I did C years ago and could probably work through it with some rough direction. Do you normally use Ming on Windows?
Thanks.
Yes there are detailed instructions at http://pymssql.sourceforge.net/compilation.php
I use Visual Studio, I've never tried Ming.
I'll consider providing binaries for 2.4 and 2.5 for some more time. But instead of wasting energy on outdated Python, I'd prefer to start working on support for Python 3.x
It is 2010 and binaries was not recompiled. Btw, where do i find sources?
Sources appeared xD. They were hidden.