A deep understanding of two important attributes of tclientdataset: Data and Delta
To deeply understand and distinguish the four important attributes of tfield: value, oldvalue, curvalue, and newvalue
Trigger sequence of tfield events:
Trigger upon display: ongettext
Triggered during editing: onsettext-> onvalidate-> onchange
(1) The ongettext event is triggered when displaytext or text is accessed. If the value stored in the database is different from the value to be displayed to the user, for example, if the bool type value is stored in the database, it must be displayed to the user as "true" or "false ", this event can be handled.
(2) The onsettext event is triggered when the field value is set.
(3) The onvalidate event is triggered before the field value is written to the record buffer. The field value can be verified in this event.
(4) The onchange event is triggered when the field value is written to the record buffer. This event is often used.
To understand the status of tclientdataset:
State attributes: dsinsert, dsedit, dsdelete, and dsbrowse
Updatestatus () method: usinserted, usmodified, usdeleted, usunmodified
Assume that the new data is added and updated to the database.