[egenix-users] cursor.rowcount abnormalities and performance
question
M.-A. Lemburg
mal at lemburg.com
Thu Jul 31 14:01:10 CEST 2003
Michal Vitecek wrote:
> Tim Golden wrote:
>
>>I haven't tried out the ODBC issues discussed
>>in this thread already, but just for the record,
>>SQL Server *itself* does provide a rowcount so if I do
>>something like this in Query Analyzer:
>>
>><code>
>>SELECT client_code
>
>>FROM clients
>
>>WHERE client_code BETWEEN 1000200 AND 1000205
>>
>>SELECT @@ROWCOUNT
>></code>
>
> the same works for Sybase ASE as MSSQL is based on it. perhaps mxODBC
> should take that into account and fetch value of @@rowcount prior to
> returning the control to the user?
If cursor.execute('SELECT @@ROWCOUNT') works on all MS Server
versions out there, no problem. But if it's really that easy to
fetch the value I wonder why MS didn't put the same logic into
their ODBC drivers... I presume that this operation is
rather costly.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Software directly from the Source (#1, Jul 31 2003)
>>> Python/Zope Products & Consulting ... http://www.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
More information about the egenix-users
mailing list