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