RAD Studio
ContentsIndex
PreviousUpNext
Updating a Read-only Result Set

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 all updates are applied to a single database table, you can indicate the underlying table to update in an OnGetTableName event handler. 

If you need more control over applying updates, you can associate the query with an update object (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.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!