Updating a Read-only Result Set

From RAD Studio
Jump to: navigation, search

Go Up to Using BDE-enabled datasets Index

Attention: The Borland Database Engine (BDE) has been deprecated, so it will not be enhanced. For instance, BDE will never have Unicode support. You should not undertake new development with BDE. Consider migrating your existing database applications from BDE to dbExpress.

Applications can update data returned in a read-only result set if they are using cached updates.

If you are using a client dataset to cache updates, the client dataset or its associated provider can automatically generate the SQL for applying updates unless the query represents multiple tables. If the query represents multiple tables, you must indicate how to apply the updates:

  • If you need more control over applying updates, you can associate the query with an update object (Bde.DBTables.TUpdateSQL). A provider automatically uses this update object to apply updates:
  • Associate the update object with the query by setting the query's UpdateObject property to the TUpdateSQL object you are using.
  • Set the update object's ModifySQL, InsertSQL, and DeleteSQL properties to SQL statements that perform the appropriate updates for your query's data.

You must use an update object if you are using the BDE to cache updates.

Note: For more information on using update objects, see Using update objects to update a dataset.

See Also