Updating dataset asp net

Rated 3.88/5 based on 574 customer reviews

The purpose of command object is to retrieve suitable data needed for populating Data Set.

As we know SQL commands directly interacting with database tables, a similar command can be assigned to Command Object. In this example, we have created a Data Table named Employee Data and the values in this table would be the results of SQL query: "Select * from employee".

Before we discuss how to write back changes, let As explore Data Adapter class in a bit more detail: We have discussed Select Command property which lets the Adapter selects its query.

The first argument to Fill function is the Data Set name which we want to populate. In this way, we can use a dataset for storing data from many database tables.

Until now, we only focused on reading data by using Data Set and Data Adapter class.

To make this more sophisticated model of data updating work, you will need to take advantage of the advanced capabilities of the Data Set and the Data Adapter classes, and you’ll need to understand how they in turn use the Command and Connection objects to mediate between the dataset and the database itself.

As explained in Chapter 11, the Data Set object interacts with the database through a Data Adapter object.

Leave a Reply