RAD Studio
ContentsIndex
PreviousUpNext
Executing the SQL Statements

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.
Note: If the SQL statement uses parameters other than the built-in types (for the original and updated field values), you must manually supply parameter values instead of relying on the parameter substitution provided by the Apply method. See Using an update component's Query property for information on manually providing parameter values.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!