Relationship between tableadapter, dataset, and bindingsource

Source: Internet
Author: User

(I'm a newbie and I'm not grateful if I find any mistakes)

Figure 1: physical database-memory database-control relationship

Tableadapter: communicates with physical databases and memory databases (Dataset), and provides select, update, insert, and delete operations.

Bingdingsource: bind a memory data table (datatable) to the control and provide filter and sort functions for the memory data table (datatable. Note:

1. bindingsource can be used to bind multiple controls to achieve data association between different controls. For example, if you have a able (student ID, name, score, and remarks), bindingsource binds the student ID, name, and score to a dview and binds the remarks to a lable, when you select different students in the datagridview, lable displays the remarks of the corresponding students. (If the datagridview and lable use two different bindingsources, they cannot be linked)

2. The same able can also be bound to different controls through different bindingsources.

In the design view of the XSD file, datatable and tableadapter appear in pairs. 2. There is a data table. Therefore, tableadapter automatically generates a SELECT statement that returns the row value, used to fill the data table. The default value is fill. The getdata method. Tableadapter allows queries with multiple select statements (return row values), select statements (return single values), update statements, delete statements, and insert statements. NOTE: For the SELECT query of each returned row value in tableadapter, its fields must correspond to the fields in the preceding data table.

Figure 2: datatable and tableadapter in the xsd file Visualization

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.