The information in this article applies to:
SYMPTOMSThe 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. CAUSEThis 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. RESOLUTIONTo 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. STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONSteps to Reproduce BehaviorTo reproduce this problem you will first need to run the stored procedure given below against the pubs database. Once that has been completed, follow the steps under Visual Basic Code.Stored Procedure:
Additional query words: kbrdo kbVBp400 kbVBp500 kbVBp600 kbdse kbDSupport kbVBp
Keywords : kbGrpVBDB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |