Asp.net: What is ADO. net

Source: Internet
Author: User
ArticleDirectory
    • Data Column
    • Data row

1. Ado. net

2. Advantages of ADO. net

3. Ado. Net Document Object Model

1.1ado.net

Ado. Net is a standard-basedProgramDesign model, which can be used to create distributed applications for data sharing

Dataset plays an important role in ADO. net. It is a copy of some data in the database in the memory. And ADO

Different from the recordset in, dataset can include any data table. Each data table can be used to represent a database table or view.

. Dataset resides in the memory and is not connected to the original database, that is, it does not need to be connected to the original database.

The underlying technology used to complete the work is XML, which is the storage and transmission format used by dataset. Components

(For example, a business logic object or Asp.net web form) needs to exchange data in dataset. The data is in the form of an XML file from a component

Transfer to another component, and the receiving component restores the file to the dataset form. Dataset has the same method as the relational data model.

2.1advantages of ado.net

2.1.1 interoperability

2.1.2 maintainability

2.1.3 programmability

2.1.4 High Performance

2.1.5 scalability

3.1ado.net Document Object Model

Ado. Net consists of dataset and managed provider. Dataset consists of a relationscollection and a tablescollection.

. Each able in tablescollection includes the columns set and rows set.

3.1.1datatable

 
Add a able to Dataset: DataSet mydataset = new dataset (); mydataset. Tables. Add (New datatable ("Products "));
    • Data Column

Multiple datacolumns can be created in a column set of a table, including:

    • Standard Column
    • Expression Column
    • Auto-increment Column
Dataset mydataset = new dataset (); datacolumn [] keys = new datacolumn [1]; mydataset. tables. add (New datatable ("Products"); mydataset. tables ["Products"]. columns. add ("ID", type. getType ("system. int32 "); mydataset. tables ["Products"]. columns. add ("name", type. getType ("string"); mydataset. tables ["Products"]. columns. add ("cost", double); keys [0] = mydataset. tables ["Products"]. columns ["ID"]; mydataset. tables [0]. primarykey = keys;
    • Data row

A Data row is a child element of a able. It represents a row of data in the original database and has a rowstate attribute.

Dataset mydataset = new dataset (); datacolumn [] keys = new datacolumn [1]; mydataset. tables. add (New datatable ("Products"); mydataset. tables ["Products"]. columns. add ("ID", type. getType ("system. int32 "); mydataset. tables ["Products"]. columns. add ("name", type. getType ("string"); mydataset. tables ["Products"]. columns. add ("cost", double); keys [0] = mydataset. tables ["Products"]. columns ["ID"]; mydataset. tables [0]. primarykey = keys; datarow myrow = NULL; myrow = mydataset. tables [0]. newrow (); myrow ["ID"] = 1; myrow ["name"] = "Wangdi"; myrow ["cost"] = 19.58; mydataset. tables [0]. rows. add (myrow );

3.1.2 Data Relationship

3.1.3 Constraints

Related Article

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.