Using TUpdateSQL to Update a Dataset

From RAD Studio
Jump to: navigation, search

Go Up to How To Perform Database Procedures

When the BDE-enabled dataset represents a stored procedure or a query that is not "live", it is not possible to apply updates directly from the dataset. Such datasets may also cause a problem when you use a client dataset to cache updates.

To update a dataset using an update object

  1. From the Tool Palette, add a TUpdateSQL component to the same form as the BDE-enabled dataset.
  2. In the Object Inspector, set the UpdateObject property of the BDE-enabled dataset component's to the TUpdateSQL component in the form.
  3. Set the ModifySQL, InsertSQL, and DeleteSQL properties of the update object to specify the SQL statements needed to perform updates.
  4. Close the dataset.
  5. Set the dataset component"s CachedUpdates property to True or link the dataset to the client dataset using a dataset provider.
  6. Reopen the dataset.
  7. Create SQL statements for update components.
  8. Use multiple update objects.
  9. Execute the SQL statements.

See Also