 |
pymssql - Default branch
|
Section: Unix |
|
|
|
| Added: Fri, Jul 22nd 2005 17:18 UTC (3 years, 1 month ago) |
Updated: Sun, Sep 24th 2006 17:06 UTC (1 year, 11 months ago) |
|
|
About:
The pymssql module provides access to MS SQL
databases from Python scripts. It implements
version 2.0 of the Python DB API.
Author:
Andrzej Kukula [contact developer]
Homepage:
http://pymssql.sourceforge.net/
Tar/GZ:
http://sourceforge.net/project/showfiles.php?group_id=40059
CVS tree (cvsweb):
http://pymssql.cvs.sourceforge.net/
Trove categories:
[change]
Dependencies:
[change]
FreeTDS 0.63 (required)
Python 2.4 (required)
[download links]
|
|
» Rating:
(not rated)
» Vitality: 0.00% (Rank 11475)
» Popularity: 0.33% (Rank 16924)

(click to enlarge graphs)
Record hits: 4,951
URL hits: 846
Subscribers: 6
|
|
Branches
Comments
[»]
lastset()
by Andrew Athan - Jul 21st 2007 06:31:00
When using certain types of queries/stored procedures that use intermediate
selects and one final select, it is possible to get multiple result sets
even though only the last select is intended to return data. This is the
case even though SQL Query Analyzer doesn't show the intermediate result.
If you use connection.execute() followed by connection.fetchall() then you
will be fetching one of the intermediate empty result sets and it will
appear that pymssql is not working correctly. To fix this, use nextset()
to get to the last result set before fetchall(). Or, add this lastset()
function:
def lastset(self):
if self._result == None:
return 0
self.__resultpos = len(self._result) - 1
return 1
-- Andrew Athan
[reply]
[top]
|
|
 |