Article ID: 195048 - View products that this article applies to.
This article was previously published under Q195048
The Execute method of the ActiveX Data Objects (ADO) Command object passes by reference an integer value that you can use to retrieve the number of records affected by a SQL UPDATE command.
The following example establishes a DSN-less connection to the SQL Server sample table ROYSCHED in the PUBS database, executes a SQL UPDATE command, displays the number of records affected by the command, then executes another UPDATE command to restore the ROYSCHED table to its previous state.
NOTE: Modify the SERVER component of the lcConnString variable, the lcUID and lcPWD variables as appropriate for your SQL Server installation.
In order to use this example, you must have Microsoft Data Access Components (MDAC) version 2.x or later installed, which is included in the data components of Visual Studio 6.0 or can be downloaded from the following Web address:
Article ID: 195048 - Last Review: July 1, 2004 - Revision: 4.3
Contact us for more help