Updating records in dataset
In an ADO join, each field object knows which underlying table it belongs to.If you update a field in the Products table and post the change, then a SQL statements are generated, one for each table.In the next section we will take a closer look at ADO's batch updates, what they can offer you, and why they are so important.However, in this section you won't need them to solve the problem of updating a join, because in ADO, joins are naturally updatable.The explanation can be found by following the same logic for deletions as for insertions.Two SQL Even if you understand how this process works, it's helpful to look at this problem through the users' eyes.
The BDE considers any SQL join to be read-only because inserting, updating, and deleting rows in a join is ambiguous.
In ADO 2.6, the error message is "Row cannot be located for updating.
Some values may have been changed since it was last read." This is the nature of optimistic locking.
To make the changes permanent, use , for example, can be used exactly the same way as for cached updates to identify records according to whether they have been inserted, updated, deleted, or unmodified.
This approach is particularly useful for highlighting records in different colors in a grid or showing their status on a status bar.Run the program twice (it is the Batch Updates example if you don't want to rebuild it) and begin editing a record in the first copy of the program.Although for the sake of simplicity I'll demonstrate a conflict using just a single machine, the scenario and subsequent events are unchanged when using multiple machines: As with many ADO error messages, the exact message you receive will depend not only on the version of ADO you are using but also on how closely you followed the example.No error occurs, because the update has been applied successfully.