This first example edits the first and last name in a record, then asks whether you want to use Update to commit the change or CancelUpdate to reject it.
This second example adds a new record, then asks whether you want to use Update to commit the change or CancelUpdate to reject it.
See How to Build the DAO Method Samples.
If you have installed the DAO SDK, see InstallDirectory\DAOSDK\SAMPLES\Update1.cpp and Update2.cpp.