BUG: SQLRowCount Does Not Return Number of Affected Rows in Stored Procedure
Article ID: 187350
Article Last Modified on 10/16/2003
APPLIES TO
- Microsoft SQL Server 6.5 Standard Edition
- Microsoft ODBC Driver for Microsoft SQL Server 3.5
This article was previously published under Q187350
SYMPTOMS
If any data is modified, updated, or inserted into a table which is
contained in a stored procedure, the SQLRowCount function does not return
the number of affected rows. It returns a value of -1.
WORKAROUND
To correctly return the number of rows affected, use the @@ROWCOUNT
variable in the stored procedure.
STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 6.5. This problem has been corrected in the latest driver 3.60.0310
available with ODBC3.5SDK.
A supported fix is now available, but has not been fully regression-tested
and should be applied only to systems experiencing this specific problem.
Unless you are severely impacted by this specific problem, Microsoft
recommends that you wait for the next Service Pack that contains this fix.
Contact Microsoft Technical Support for more information.
Additional query words: ODBC
Keywords: kbbug kbfix KB187350