RDO RowsAffected Property Does Not Return Correct Value (182958)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q182958 SYMPTOMS The RowsAffected property of RDO does not return the
correct number of rows affected when using a stored procedure. Instead the
RowsAffected property returns a zero or 1. CAUSE This behavior occurs when using Microsoft SQL Server driver
(SQLSRV32.DLL) version 3.xx. In earlier versions of the SQL Server driver, the
RDO RowsAffected property correctly returned the numbers of rows that were
affected by the stored procedure. RESOLUTION To work around the problem described below, it is necessary
to return the @@ROWCOUNT value manually at the end of the stored procedure and
change the Visual Basic code so that it captures this value. To do this in the
code below, comment out the SQL = "{Call RowsAffectedTest}" line. Then
uncomment both the line SQL = "{? = Call RowsAffectedTest}" and the last line
of the code. Run the program again to see that the correct number of rows
affected is returned by the stored procedure's return value. STATUS Microsoft is researching this problem and will post new
information here in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbprb KB182958 |
---|
|