Executing the SQL Statements
Go Up to Using Multiple Update Objects Index
When you use multiple update objects, you do not associate the update objects with a dataset by setting its UpdateObject property. As a result, the appropriate statements are not automatically executed when you apply updates. Instead, you must explicitly invoke the update object in code.
There are two ways to invoke the update object. Which way you choose depends on whether the SQL statement uses parameters to represent field values:
- If the SQL statement to execute uses parameters, call the Apply method.
- If the SQL statement to execute does not use parameters, it is more efficient to call the ExecSQL method.