How to save data from dataset? - DOT.NET

How to save data from dataset?

The modified data needs to be sent back to the database in order to save it. Therefore, to send the modified data to a database, the Update method of a TableAdapter or data adapter needs to be called. The Update method executes either of INSERT, UPDATE, or DELETE depending on the RowState in the table.

In Visual Studio a TableAdapterManager component is used for saving the proper order based on the foreign-key constraints of the database.

Although the procedure to save the data may change depending upon the applications, the following steps throw light on the generalized concept:

- The code sends updates to the database should be written within a try/catch block.

- The data row should be located to determine the problem area and the code should then be reattempted.
Explain the difference between dataset clone and dataset copy - DOT.NET
Dataset.clone() duplicates (only) the structure of a dataset, without duplicating the data....
Explain the difference between DataSet and DataReader - DOT.NET
Datareader fetches one row at a time from the datasource. DataSet fetches all data from the datasource at a time to its memory area.....
How do we step through code? - DOT.NET
Stepping through the code is a way of debugging the code in which one line is executed at a time.....
Post your comment