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
- From the Tool Palette, add a TUpdateSQL component to the same form as the BDE-enabled dataset.
- In the Object Inspector, set the UpdateObject property of the BDE-enabled dataset component’s to the TUpdateSQL component in the form.
- Set the ModifySQL, InsertSQL, and DeleteSQL properties of the update object to specify the SQL statements needed to perform updates.
- Close the dataset.
- Set the dataset component’s CachedUpdates property to True or link the dataset to the client dataset using a dataset provider.
- Reopen the dataset.
- Create SQL statements for update components.
- Use multiple update objects.
- Execute the SQL statements.