Common events and trigger sequence in datasnap (Midas) layer-3 Architecture

Source: Internet
Author: User

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.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.