Introduction to ADO. NET

Source: Internet
Author: User

Introduction to ADO. NET
About ADO. NET

ADO. NET is a database access method provided by Microsoft. He enables. NET programmers to use the same access method for different databases.

 

Connection

Connection is a database Connection class. It is responsible for opening and closing the database Connection.

To interact with a database, you must connect to it. It allows subsequent objects to know which data source to execute the command!

Command

Command is a tool used to execute SQL statements. The addition, deletion, modification, and query operations are all executed by Command.

After establishing a database connection, you can use the Command object to execute commands such as adding, deleting, modifying, and querying.

Commonly used methods include ExecuteReader (), ExecuteScalar (), and ExecuteNonQuery ().

DataReader Reader

After an SQL statement is executed, the result set formed by the SQL statement is stored in the memory of the database server.

It can be displayed in the application only after it is retrieved.

DataReader is such a read-only reader.

DataAdapter Adapter

The returned value of DataReader has only one row. When we want to obtain an entire table.

You need to use the DataAdapter to obtain it.

Adatper is an adapter (refer to the adapter mode in design mode). What is its adaptation?

DataAdapter is applicable to the return values of DataTable and DataReader.

DataSet

DataSet is a small local database, which is stored in the memory of the client in the form of several tables.

 

 

 


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.