Everyone knows that data saved by DataSet is "copy" in the original database in the server memory. So the process of updating the data with DataSet is to update the "copy", and then "original" update, according to my understanding is to overwrite "original". Specifically to the process, first, you need to find a row that needs to be updated, then assign a new value, and finally update the original database. To find the row you need to modify, the more convenient approach is to find a value in the record, which is more convenient than using the "Line Number" "line number". To do this, first, you must specify a primary key to the database, then follow the primary key. Note that this primary key must be specified in the program, and this primary key is not necessarily the same as the primary key for your database. Then is the last update, of course, using the DataAdapter's Update () method is implemented with CommandBuilder. This is because we use Update () actually generates a SQL statement through CommandBuilder, and then the database operation is performed. The primary key may not be specified in the original database, but must be specified in the program.
<% @ import namespace = "system.data"%> <% @ import namespace = "system.data.oledb"%>