Executing an Update Query

Executing bulk queries that update data is quite easy with ADO. You can use the Execute method of the Connection or Command object. The procedure in Hands-On 15-8 uses the Connection object's Execute method to update records in the Products table of the Northwind database where CategoryId is equal to 8. The UnitPrice of the records that match this condition will be increased by one dollar. Note that the number of updated records is returned by the Execute method in the NumOfRec variable.

Part II

0 0

Post a comment