On the modification of Ado.net database operation

Source: Internet
Author: User
Tags net xml

We need to connect to the database after the increase of the check, here we will be detailed analysis of it. For ado.net database operation Insert,update,delete, such as one-way operation, for inserts, deletes, modifies and so on operation, because is the client application requests to the database, does not need to return the source data, this process is the one-way operation. The specific process of a one-way operation is shown in the figure:

Insert,update,delete one-way operation diagram

There are three main processes: first, establish a connection object for a specific database, open the database using the open () method of the Connection object, and then include inserts, deletes, The command object that modifies such command information, and the accompanying command object within DataAdapter, can use the Execute series method to execute commands that correspond to command information, and finally, close the database with the Connection object's closing () method.

One thing to emphasize here is that there are four command objects associated with DataAdapter: SelectCommand, InsertCommand, DeleteCommand, UpdateCommand. The command information required to execute the SELECT command is called by the SelectCommand the corresponding method implementation, insert with the insertcommand,delete with Deletecommand,update UpdateCommand.

Ado. NET database Operations bidirectional operation for Select

For query operations, the source data needs to be returned because it is a request made by a client application to the database, which is a two-way operation. The specific process of bidirectional operation is as shown in the figure:

Ado. NET database Operations Select two-way operation diagram

Ingenious use of Ado.net DataRelation objects

Example shows the number of ado.net datasets added to the dataset ...

Let's learn ado.net XML schemas

The great significance of revealing ado.net annotation in programming

Ado. NET Entry Basics Five Benefits Summary

There are three main processes: first, set up a connection object for a specific database, open the database using the open () method of the Connection object; Command objects containing query command information and associated SelectCommand objects in DataAdapter can execute commands that correspond to command information, and the data obtained by the query can be obtained by DataReader object or DataAdapter object with fill () method is populated in the DataSet object, and finally, the database is closed with the close () method of the Connection object. W

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.