Updating dataset asp net dating language barrier

So far in this chapter, you have seen how to update a database and how to add transactions to ensure data integrity.

All of that is fine as far as it goes, but nothing you’ve done so far to update the database takes advantage of the Data Set object, which you will remember is the keystone of ADO. If you are using the Data Set object to retrieve data and pass it from tier to tier within your application, you would also like to manipulate that data within the dataset and push the changes back to the database.

However, Datasets can not directly retrieve data from Databases.

Data Adapters are used to link Databases with Data Sets.

Until now, you’ve created the data adapter by passing in a command string and a connection string to the Data Adapter object’s constructor and then calling the Fill method.

It turns out that Fill interacts with the database by creating a command object on your behalf and assigning that command object to the Select Command property of the Data Adapter object.

This constructor takes a command object and a database connection object.There are three other properties including Update Command, Add Command and Delete Command.All these commands would make changes in the database.The following code shows a typical contains a client copy of the database data.In this section, you will add a button that enables client data changes to be saved back to the database.

Leave a Reply