Datasset class and dataadapter class commandbulider class overview

Source: Internet
Author: User

Although dataset can run as a database, it is important that the DataSet object does not directly interact with data or other source data. It aims to enable developers to use consistent programming models without worrying about the resident location of source data. All files from databases, XML files,CodeOr the data you enter can be added to the DataSet object. dataadapter class is used to deal with the data. It includes filling data in dataset or updating the changed database in dataset to the mapped source.

Example:
Dataset DS = new dataset ();
Sqlcommand sel = new sqlcommand ("select * from Table name ');
Dataadapter1.selectcommand = sel;
Dataadapter. Fill (DS, "table alias ")

When updating data in the DataSet object to the database, you can use the commandbuilder class to reduce the encoding volume. It can automatically generate the corresponding update, insert, and delete statements based on the Select language name.

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.